From b27693426ffd80a455a7a4197898e9fcac5137ac Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 21:41:06 +0100 Subject: [PATCH 1/6] ??????????? --- Dockerfile | 4 +- EOToolsWeb.Api/EOToolsWeb.Api.csproj | 58 +++++++++++++++++-- EOToolsWeb.Api/Program.cs | 57 +++++------------- EOToolsWeb.Shared/EOToolsWeb.Shared.csproj | 8 +-- .../EOToolsWeb.Desktop.csproj | 6 +- EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj | 24 ++++---- EoToolsWeb.Updater/EoToolsWeb.Updater.csproj | 14 ++--- 7 files changed, 96 insertions(+), 75 deletions(-) diff --git a/Dockerfile b/Dockerfile index a666e53..554a571 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base WORKDIR /app EXPOSE 8080 EXPOSE 8081 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["EOToolsWeb.Api/EOToolsWeb.Api.csproj", "EOToolsWeb.Api/"] diff --git a/EOToolsWeb.Api/EOToolsWeb.Api.csproj b/EOToolsWeb.Api/EOToolsWeb.Api.csproj index 2e07b95..17a9a03 100644 --- a/EOToolsWeb.Api/EOToolsWeb.Api.csproj +++ b/EOToolsWeb.Api/EOToolsWeb.Api.csproj @@ -1,7 +1,7 @@  - net8.0 + net10.0 enable enable 82c8340f-25e9-428c-a86e-94acf0c6eda1 @@ -9,6 +9,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -19,14 +65,14 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + diff --git a/EOToolsWeb.Api/Program.cs b/EOToolsWeb.Api/Program.cs index 6e6e3cd..ceaba4d 100644 --- a/EOToolsWeb.Api/Program.cs +++ b/EOToolsWeb.Api/Program.cs @@ -2,13 +2,15 @@ using EOToolsWeb.Api.Services; using EOToolsWeb.Api.Services.GitManager; using EOToolsWeb.Api.Services.UpdateData; +using EOToolsWeb.Shared.Sessions; using Microsoft.AspNetCore.Authentication; using Microsoft.EntityFrameworkCore; -using Microsoft.OpenApi.Models; +using NSwag; +using NSwag.Generation.Processors.Security; +using System.Reflection.Metadata; using System.Runtime.InteropServices; using System.Text.Encodings.Web; using System.Text.Json; -using EOToolsWeb.Shared.Sessions; var builder = WebApplication.CreateBuilder(args); @@ -18,55 +20,28 @@ // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(option => +builder.Services.AddOpenApiDocument(option => { - option.AddSecurityDefinition("ApiAuthentication", new OpenApiSecurityScheme + option.AddSecurity("ApiAuthentication", new OpenApiSecurityScheme() { - In = ParameterLocation.Header, + In = OpenApiSecurityApiKeyLocation.Header, Description = "Username / Password", Name = "Authorization", - Type = SecuritySchemeType.Http, + Type = OpenApiSecuritySchemeType.Http, Scheme = "Basic", }); - option.AddSecurityDefinition("TokenAuthentication", new OpenApiSecurityScheme + option.AddSecurity("TokenAuthentication", new OpenApiSecurityScheme { - In = ParameterLocation.Header, + In = OpenApiSecurityApiKeyLocation.Header, Description = "Token", Name = "X-TOKEN-EO-TOOLS-WEB-X", - Type = SecuritySchemeType.ApiKey, + Type = OpenApiSecuritySchemeType.ApiKey, Scheme = "", }); - option.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "ApiAuthentication" - } - }, - new string[]{} - } - }); - - option.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "TokenAuthentication" - } - }, - new string[]{} - } - }); + option.OperationProcessors.Add(new AspNetCoreOperationSecurityScopeProcessor("ApiAuthentication")); + option.OperationProcessors.Add(new AspNetCoreOperationSecurityScopeProcessor("TokenAuthentication")); }); builder.Services.AddScoped(); @@ -120,10 +95,10 @@ // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(config => + app.UseOpenApi(); + app.UseSwaggerUi(config => { - config.EnablePersistAuthorization(); + config.PersistAuthorization = true; }); } diff --git a/EOToolsWeb.Shared/EOToolsWeb.Shared.csproj b/EOToolsWeb.Shared/EOToolsWeb.Shared.csproj index ad775fb..3b1c9b6 100644 --- a/EOToolsWeb.Shared/EOToolsWeb.Shared.csproj +++ b/EOToolsWeb.Shared/EOToolsWeb.Shared.csproj @@ -1,15 +1,15 @@  - net8.0 + net10.0 enable enable - - - + + + diff --git a/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj b/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj index addf308..7781458 100644 --- a/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj +++ b/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj @@ -3,7 +3,7 @@ WinExe - net8.0 + net10.0 enable true @@ -13,9 +13,9 @@ - + - + diff --git a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj index 5ec3e7c..a4202f3 100644 --- a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj +++ b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 enable preview true @@ -23,19 +23,19 @@ - - - + + + - - - + + + - - - - - + + + + + diff --git a/EoToolsWeb.Updater/EoToolsWeb.Updater.csproj b/EoToolsWeb.Updater/EoToolsWeb.Updater.csproj index eeaa1ab..9ca56c9 100644 --- a/EoToolsWeb.Updater/EoToolsWeb.Updater.csproj +++ b/EoToolsWeb.Updater/EoToolsWeb.Updater.csproj @@ -1,7 +1,7 @@  WinExe - net8.0 + net10.0 enable true app.manifest @@ -10,13 +10,13 @@ - - - - + + + + - - + + From 924426e65b3c60e6e9911d41f9ef2bbba0afac7d Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:01:13 +0100 Subject: [PATCH 2/6] Attempt with CI --- EOToolsWeb.sln | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EOToolsWeb.sln b/EOToolsWeb.sln index 349c14c..7fbdd88 100644 --- a/EOToolsWeb.sln +++ b/EOToolsWeb.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.9.34728.123 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11206.111 d18.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOToolsWeb", "EOToolsWeb\EOToolsWeb\EOToolsWeb.csproj", "{FF84FDF0-DA65-4DC3-B4FB-52A057315CAD}" EndProject @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .dockerignore = .dockerignore .gitignore = .gitignore + .github\workflows\docker-image.yml = .github\workflows\docker-image.yml Dockerfile = Dockerfile EndProjectSection EndProject From 5069c75e08ceb22c71c29f67cc8a51a63dd25139 Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:02:38 +0100 Subject: [PATCH 3/6] Fix --- EOToolsWeb.Api/EOToolsWeb.Api.csproj | 130 +++++++++------------------ 1 file changed, 42 insertions(+), 88 deletions(-) diff --git a/EOToolsWeb.Api/EOToolsWeb.Api.csproj b/EOToolsWeb.Api/EOToolsWeb.Api.csproj index 17a9a03..898a4ce 100644 --- a/EOToolsWeb.Api/EOToolsWeb.Api.csproj +++ b/EOToolsWeb.Api/EOToolsWeb.Api.csproj @@ -1,97 +1,51 @@  - - net10.0 - enable - enable - 82c8340f-25e9-428c-a86e-94acf0c6eda1 - Linux - + + net10.0 + enable + enable + 82c8340f-25e9-428c-a86e-94acf0c6eda1 + Linux + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - Always - - + + + Always + + - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + - - - + + + - - - Always - - - Always - - - Always - - - Always - - + + + Always + + + Always + + + Always + + + Always + + From abafcb22d46086e80c1e7493be7f613e33156a0f Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:08:00 +0100 Subject: [PATCH 4/6] linux --- .github/workflows/docker-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f161e06..85931a6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -19,6 +19,9 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -26,6 +29,7 @@ jobs: - name: Build and push image uses: docker/build-push-action@v6 with: + platforms: linux/arm64,linux/amd64 context: . file: ./Dockerfile push: true From 9ad0e0de117afec2d0bfb0616f8a7327643c6fb3 Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:41:57 +0100 Subject: [PATCH 5/6] Fix --- EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj | 1 + EOToolsWeb/EOToolsWeb.Desktop/Program.cs | 4 ++++ EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj b/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj index 7781458..c14cb9e 100644 --- a/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj +++ b/EOToolsWeb/EOToolsWeb.Desktop/EOToolsWeb.Desktop.csproj @@ -16,6 +16,7 @@ + diff --git a/EOToolsWeb/EOToolsWeb.Desktop/Program.cs b/EOToolsWeb/EOToolsWeb.Desktop/Program.cs index 391ac07..c9d18c0 100644 --- a/EOToolsWeb/EOToolsWeb.Desktop/Program.cs +++ b/EOToolsWeb/EOToolsWeb.Desktop/Program.cs @@ -13,6 +13,10 @@ internal sealed class Program public static void Main(string[] args) => BuildAvaloniaApp() .StartWithClassicDesktopLifetime(args); + // TODO : Need to replace the nuget Avalonia.ReactiveUI by ReactiveUI.Avalonia + // This can't be done for the moment cause of an issue on startup + // See https://github.com/reactiveui/ReactiveUI/issues/4123 + // Avalonia configuration, don't remove; also used by visual designer. public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() diff --git a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj index a4202f3..c6fb384 100644 --- a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj +++ b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj @@ -34,7 +34,6 @@ - From e93b633c4565d94f112077a906e88ba338dd4e7f Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Fri, 14 Nov 2025 22:42:34 +0100 Subject: [PATCH 6/6] 2.5.0 --- EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj index c6fb384..0a6b06c 100644 --- a/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj +++ b/EOToolsWeb/EOToolsWeb/EOToolsWeb.csproj @@ -4,8 +4,8 @@ enable preview true - 2.4.2 - 2.4.2 + 2.5.0 + 2.5.0