Skip to content

Commit

Permalink
Merge pull request #529 from ipax77/dev
Browse files Browse the repository at this point in the history
Update dotnet/ChartJs
  • Loading branch information
ipax77 authored Feb 26, 2025
2 parents 2386273 + f96dc5c commit 84624c5
Show file tree
Hide file tree
Showing 20 changed files with 99 additions and 74 deletions.
4 changes: 2 additions & 2 deletions src/MysqlMigrations/MysqlMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.11">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.13">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/SC2ArcadeCrawler/SC2ArcadeCrawler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
</ItemGroup>

Expand Down
12 changes: 6 additions & 6 deletions src/dsstats.api/dsstats.api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MailKit" Version="4.8.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.11">
<PackageReference Include="MailKit" Version="4.10.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.13">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/dsstats.apiServices/dsstats.apiServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/dsstats.auth/dsstats.auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MailKit" Version="4.8.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="MailKit" Version="4.10.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/dsstats.db8/dsstats.db8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Automapper" Version="13.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.11">
<PackageReference Include="Automapper" Version="14.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.13">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/dsstats.db8services/dsstats.db8services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

<ItemGroup>
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="LinqKit" Version="1.3.7" />
<PackageReference Include="LinqKit" Version="1.3.8" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13" />
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.119" />
<PackageReference Include="System.Drawing.Common" Version="8.0.11" />
<PackageReference Include="System.Drawing.Common" Version="8.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
51 changes: 38 additions & 13 deletions src/dsstats.decode/DecodeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,62 @@ private async void OnDecodeFinished(DecodeEventArgs e)

public async Task<int> SaveReplays(Guid guid, List<IFormFile> files)
{
int filesSaved = 0;

try
{
long size = files.Sum(f => f.Length);

foreach (var formFile in files)
{
if (formFile.Length > 0)
{
var fileGuid = Guid.NewGuid();
var filePath = Path.Combine(decodeSettings.Value.ReplayFolders.ToDo, guid.ToString() + "_" + fileGuid.ToString() + ".SC2Replay");
var tmpFilePath = Path.Combine(decodeSettings.Value.ReplayFolders.ToDo, guid.ToString() + "_" + fileGuid.ToString() + ".tmp");
string fileHash;
using (var md5 = MD5.Create())
{
using var stream = formFile.OpenReadStream();
fileHash = BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLowerInvariant();
}

var destinationFile = Path.Combine(decodeSettings.Value.ReplayFolders.Done, $"{fileHash}.SC2Replay");
var todoFile = Path.Combine(decodeSettings.Value.ReplayFolders.ToDo, $"{guid}_{fileHash}.SC2Replay");

if (File.Exists(destinationFile))
{
logger.LogInformation("File {FileName} already exists. Skipping upload.", formFile.FileName);
continue;
}

try
{
using var stream = File.Create(tmpFilePath);
await formFile.CopyToAsync(stream);
var tmpFile = todoFile + ".tmp";
using var fileStream = File.Create(tmpFile);
await formFile.CopyToAsync(fileStream);
File.Move(tmpFile, todoFile);
filesSaved++;
}
File.Move(tmpFilePath, filePath);
catch (Exception ex)
{
logger.LogError(ex, "Error saving file {FileName}.", formFile.FileName);
}
}
else
{
logger.LogWarning("File {FileName} is empty and will be skipped.", formFile.FileName);
}
}
_ = Decode();

logger.LogWarning("replays saved ({size})", size);
return queueCount;
_ = Decode();
}
catch (Exception ex)
{
logger.LogError("failed saving replays: {error}", ex.Message);
logger.LogError(ex, "Unexpected error in SaveReplays.");
return -1;
}
return -1;

logger.LogInformation("{FilesSaved} files saved for GUID {Guid}.", filesSaved, guid);
return filesSaved;
}


public async Task Decode()
{
Interlocked.Increment(ref queueCount);
Expand Down
6 changes: 3 additions & 3 deletions src/dsstats.maui/SqliteMigrations/SqliteMigrations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.11">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.13">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="IronPython.StdLib" Version="2.7.12" />
<PackageReference Include="s2protocol.NET" Version="0.8.4" />
<PackageReference Include="System.Drawing.Common" Version="8.0.11" />
<PackageReference Include="System.Drawing.Common" Version="8.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/dsstats.pickban/dsstats.pickban.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/dsstats.ratings.lib/dsstats.ratings.lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/dsstats.ratings/dsstats.ratings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<ItemGroup>
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.13" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/dsstats.razorlib/dsstats.razorlib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="Blazored.Toast" Version="4.2.1" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="pax.BlazorChartJs" Version="0.8.5" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/dsstats.razorlib/wwwroot/js/chart.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/dsstats.web/dsstats.authclient/dsstats.authclient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.13" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions src/dsstats.web/dsstats.web.Client/dsstats.web.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.13" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/dsstats.web/dsstats.web/dsstats.web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<ProjectReference Include="..\..\dsstats.shared\dsstats.shared.csproj" />
<ProjectReference Include="..\dsstats.authclient\dsstats.authclient.csproj" />
<ProjectReference Include="..\dsstats.web.Client\dsstats.web.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.11" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.2.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.13" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.6.0" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/tests/dsstats.pickban.tests/dsstats.pickban.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions src/tests/dsstats.ratings.tests/dsstats.ratings.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 84624c5

Please sign in to comment.