From 79d7d978a42b5ead608a4bbd8dff9f111ef63351 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Mon, 16 Oct 2023 05:43:55 +0000 Subject: [PATCH] feat: update to bit 7.0.0 #25 (#26) --- .devcontainer/devcontainer.json | 2 +- .github/workflows/cd.yml | 10 ++++----- .github/workflows/ci.yml | 10 ++++----- global.json | 4 ++-- .../Bit.TemplatePlayground.Client.App.csproj | 22 +++++++++---------- .../Bit.TemplatePlayground.Client.Core.csproj | 20 ++++++++--------- src/Client/Core/Pages/TermsPage.razor | 22 +++++++++---------- src/Client/Core/Styles/app.scss | 1 + .../Bit.TemplatePlayground.Client.Web.csproj | 12 +++++----- src/Client/Web/wwwroot/service-worker.js | 2 +- .../Web/wwwroot/service-worker.published.js | 2 +- src/Directory.Build.props | 2 +- .../Iac/Bit.TemplatePlayground.Iac.csproj | 2 +- src/Server/Api/.config/dotnet-tools.json | 2 +- .../Bit.TemplatePlayground.Server.Api.csproj | 20 ++++++++--------- src/Server/Api/Services/JwtService.cs | 6 ++--- .../Bit.TemplatePlayground.Shared.csproj | 14 ++++++------ src/Shared/Resources/AppStrings.fr.resx | 2 +- 18 files changed, 78 insertions(+), 77 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f10e414..2704de9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "hostRequirements": { "cpus": 4 }, - "onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/764f2fec-710d-490d-a341-88636bce1a8d/35fc13fc20161a7d196200d9c2c6a8f0/dotnet-sdk-8.0.100-rc.1.23463.5-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust && dotnet tool install --global dotnet-ef --version 8.0.0-rc.1.23419.6 && dotnet ef database update --project src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj && dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -t:BeforeBuildTasks --no-restore", + "onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/9144f37e-b370-41ee-a86f-2d2a69251652/bc1d544112ec134184a5aec7f7a1eaf9/dotnet-sdk-8.0.100-rc.2.23502.2-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && dotnet dev-certs https --trust && dotnet tool install --global dotnet-ef --version 8.0.0-rc.1.23419.6 && dotnet ef database update --project src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj && dotnet build src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj -t:BeforeBuildTasks --no-restore", "waitFor": "onCreateCommand", "customizations": { "codespaces": { diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 6f7e48b..52cbffd 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,7 +40,7 @@ jobs: run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj - name: Install wasm - run: dotnet workload install wasm-tools wasm-experimental --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install wasm-tools wasm-experimental - name: Generate CSS/JS files run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore @@ -144,7 +144,7 @@ jobs: ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Generate CSS/JS files run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore @@ -191,7 +191,7 @@ jobs: ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - name: Install maui - run: dotnet workload install maui-android --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui-android - name: Generate CSS/JS files run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore @@ -234,7 +234,7 @@ jobs: ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Generate CSS/JS files run: dotnet build src/Client/Core/Bit.TemplatePlayground.Client.Core.csproj -t:BeforeBuildTasks --no-restore @@ -274,7 +274,7 @@ jobs: ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Extract iOS code signing certificate from env uses: timheuer/base64-to-file@v1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22813be..585a72c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: node-version: 18 - name: Install maui - run: dotnet workload install maui-android --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui-android - name: Build run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android @@ -76,7 +76,7 @@ jobs: node-version: 18 - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Build run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0 @@ -100,7 +100,7 @@ jobs: node-version: 18 - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Build run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios @@ -124,7 +124,7 @@ jobs: node-version: 18 - name: Install maui - run: dotnet workload install maui --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install maui - name: Build run: dotnet build src/Client/App/Bit.TemplatePlayground.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst @@ -151,7 +151,7 @@ jobs: run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Bit.TemplatePlayground.Client.Web.csproj - name: Install wasm - run: dotnet workload install wasm-tools wasm-experimental --sdk-version=8.0.100-rc.1.23463.5 + run: cd src && dotnet workload install wasm-tools wasm-experimental - name: Build run: dotnet build src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" \ No newline at end of file diff --git a/global.json b/global.json index 49b584f..273f0cf 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100-rc.1.23463.5", - "rollForward": "disable" + "version": "8.0.100-rc.2.23502.2", + "rollForward": "disable" } } \ No newline at end of file diff --git a/src/Client/App/Bit.TemplatePlayground.Client.App.csproj b/src/Client/App/Bit.TemplatePlayground.Client.App.csproj index 6af407d..76555e6 100644 --- a/src/Client/App/Bit.TemplatePlayground.Client.App.csproj +++ b/src/Client/App/Bit.TemplatePlayground.Client.App.csproj @@ -16,7 +16,7 @@ com.bitplatform.Bit.TemplatePlayground.Template - B3CC4D37-6CF6-496B-8485-5EF012657E0C + 2CF3C9D5-3732-41B7-95A7-77338B8C8474 1.0 @@ -65,7 +65,7 @@ - + @@ -83,14 +83,14 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -102,10 +102,10 @@ - - - - + + + + + diff --git a/src/Infra/Iac/Bit.TemplatePlayground.Iac.csproj b/src/Infra/Iac/Bit.TemplatePlayground.Iac.csproj index 781527f..2469702 100644 --- a/src/Infra/Iac/Bit.TemplatePlayground.Iac.csproj +++ b/src/Infra/Iac/Bit.TemplatePlayground.Iac.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Server/Api/.config/dotnet-tools.json b/src/Server/Api/.config/dotnet-tools.json index 241a28d..a465223 100644 --- a/src/Server/Api/.config/dotnet-tools.json +++ b/src/Server/Api/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.0-rc.1.23419.6", + "version": "8.0.0-rc.2.23480.2", "commands": [ "dotnet-ef" ] diff --git a/src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj b/src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj index 9e591fe..ffc1308 100644 --- a/src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj +++ b/src/Server/Api/Bit.TemplatePlayground.Server.Api.csproj @@ -15,40 +15,40 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/Server/Api/Services/JwtService.cs b/src/Server/Api/Services/JwtService.cs index ee4937e..9d5a130 100644 --- a/src/Server/Api/Services/JwtService.cs +++ b/src/Server/Api/Services/JwtService.cs @@ -33,9 +33,9 @@ public async Task GenerateToken(User user) { Issuer = _appSettings.JwtSettings.Issuer, Audience = _appSettings.JwtSettings.Audience, - IssuedAt = DateTime.Now, - NotBefore = DateTime.Now.AddMinutes(_appSettings.JwtSettings.NotBeforeMinutes), - Expires = DateTime.Now.AddMinutes(_appSettings.JwtSettings.ExpirationMinutes), + IssuedAt = DateTime.UtcNow, + NotBefore = DateTime.UtcNow.AddMinutes(_appSettings.JwtSettings.NotBeforeMinutes), + Expires = DateTime.UtcNow.AddMinutes(_appSettings.JwtSettings.ExpirationMinutes), SigningCredentials = signingCredentials, Subject = new ClaimsIdentity(claims) }); diff --git a/src/Shared/Bit.TemplatePlayground.Shared.csproj b/src/Shared/Bit.TemplatePlayground.Shared.csproj index 0aa2137..76671cb 100644 --- a/src/Shared/Bit.TemplatePlayground.Shared.csproj +++ b/src/Shared/Bit.TemplatePlayground.Shared.csproj @@ -6,19 +6,19 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + compile; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Shared/Resources/AppStrings.fr.resx b/src/Shared/Resources/AppStrings.fr.resx index 0bf8992..569df0f 100644 --- a/src/Shared/Resources/AppStrings.fr.resx +++ b/src/Shared/Resources/AppStrings.fr.resx @@ -712,7 +712,7 @@ Veuillez confirmer votre email en cliquant sur le lien. Non - Utiliser bitplatform ! + Utiliser bit platform ! Oui