Skip to content

Commit

Permalink
Restructure projects
Browse files Browse the repository at this point in the history
- Remove "Duende." prefix from project names and folders
- Add <AssemblyName> and <RootNamespace> across impacted projects
- Add Build project to solution.
- Move all tests to a single test project
  • Loading branch information
damianh committed Oct 15, 2024
1 parent d80fa66 commit d5ba089
Show file tree
Hide file tree
Showing 182 changed files with 169 additions and 258 deletions.
240 changes: 106 additions & 134 deletions Duende.Bff.sln → Bff.sln

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Duende.Bff.sln.DotSettings → Bff.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.</s:String></wpf:ResourceDictionary>
// See LICENSE in the project root for license information.</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002ECodeCleanup_002EFileHeader_002EFileHeaderSettingsMigrate/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
File renamed without changes.
8 changes: 8 additions & 0 deletions Bff.v3.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<EnableRDI>True</EnableRDI>
<RdiConfigured>True</RdiConfigured>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
2 changes: 0 additions & 2 deletions build.cmd

This file was deleted.

3 changes: 0 additions & 3 deletions build.sh

This file was deleted.

10 changes: 5 additions & 5 deletions build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ internal static async Task Main(string[] args)

Target(Targets.Pack, DependsOn(Targets.Build, Targets.CleanPackOutput), () =>
{
Run("dotnet", $"pack ./src/Duende.Bff/Duende.Bff.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Duende.Bff.EntityFramework/Duende.Bff.EntityFramework.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Duende.Bff.Yarp/Duende.Bff.Yarp.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Duende.Bff.Blazor/Duende.Bff.Blazor.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Duende.Bff.Blazor.Client/Duende.Bff.Blazor.Client.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Bff/Bff.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Bff.EntityFramework/Bff.EntityFramework.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Bff.Yarp/Bff.Yarp.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Bff.Blazor/Bff.Blazor.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
Run("dotnet", $"pack ./src/Bff.Blazor.Client/Bff.Blazor.Client.csproj -c Release -o {Directory.CreateDirectory(packOutput).FullName} --no-build --nologo");
});

Target(Targets.SignPackage, DependsOn(Targets.Pack, Targets.RestoreTools), () =>
Expand Down
2 changes: 1 addition & 1 deletion migrations/UserSessionDb/UserSessionDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff.EntityFramework\Duende.Bff.EntityFramework.csproj" />
<ProjectReference Include="..\..\src\Bff.EntityFramework\Bff.EntityFramework.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Duende.Bff.Blazor.Client\Duende.Bff.Blazor.Client.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff.Blazor.Client\Bff.Blazor.Client.csproj" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions samples/Blazor/PerComponent/PerComponent/PerComponent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<ItemGroup>
<ProjectReference Include="..\PerComponent.Client\PerComponent.Client.csproj" />
<ProjectReference Include="..\..\..\..\src\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\..\..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\..\..\src\Duende.Bff.Blazor\Duende.Bff.Blazor.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff\Bff.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff.Blazor\Bff.Blazor.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Duende.Bff.Blazor.Client\Duende.Bff.Blazor.Client.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff.Blazor.Client\Bff.Blazor.Client.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/Blazor/WebAssembly/WebAssembly/WebAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\..\..\..\src\Bff\Bff.csproj" />
<ProjectReference Include="..\WebAssembly.Client\WebAssembly.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion samples/JS.Yarp/JS.Yarp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/JS8.DPoP/JS8.DPoP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/JS8.EF/JS8.EF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff.EntityFramework\Duende.Bff.EntityFramework.csproj" />
<ProjectReference Include="..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\src\Bff.EntityFramework\Bff.EntityFramework.csproj" />
<ProjectReference Include="..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/JS8/JS8.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>Duende.BFF.Blazor.Client</AssemblyName>
<RootNamespace>Duende.Bff.Blazor.Client</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Duende.Bff\Shared\ClaimLite.cs" Link="Shared\ClaimLite.cs" />
<Compile Include="..\Duende.Bff\Shared\ClaimsLiteExtensions.cs" Link="Shared\ClaimsLiteExtensions.cs" />
<Compile Include="..\Duende.Bff\Shared\ClaimsPrincipalLite.cs" Link="Shared\ClaimsPrincipalLite.cs" />
<Compile Include="..\Bff\Shared\ClaimLite.cs" Link="Shared\ClaimLite.cs" />
<Compile Include="..\Bff\Shared\ClaimsLiteExtensions.cs" Link="Shared\ClaimsLiteExtensions.cs" />
<Compile Include="..\Bff\Shared\ClaimsPrincipalLite.cs" Link="Shared\ClaimsPrincipalLite.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" />
<PackageReference Include="Microsoft.Extensions.Http" />
<!-- Explicitly taking this version so that we don't pull in vulnerable old versions. -->
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Duende.Bff.Blazor.Client.UnitTests" />
<InternalsVisibleTo Include="Bff.Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
</ItemGroup>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>Duende.BFF.Blazor</AssemblyName>
<RootNamespace>Duende.Bff.Blazor</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\Duende.Bff.Blazor.Client\Duende.Bff.Blazor.Client.csproj" />
<ProjectReference Include="..\Bff\Bff.csproj" />
<ProjectReference Include="..\Bff.Blazor.Client\Bff.Blazor.Client.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>

<AssemblyName>Duende.BFF.EntityFramework</AssemblyName>
<RootNamespace>Duende.Bff.EntityFramework</RootNamespace>
<Description>Entity Framework Core support for backend for frontend (BFF) host for ASP.NET Core</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />

<ProjectReference Include="..\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\Bff\Bff.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

<AssemblyName>Duende.BFF.Yarp</AssemblyName>
<RootNamespace>Duende.Bff.Yarp</RootNamespace>
<Description>Backend for frontend (BFF) host for ASP.NET Core (YARP integration)</Description>
</PropertyGroup>

Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\Bff\Bff.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/Duende.Bff/Duende.Bff.csproj → src/Bff/Bff.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

<AssemblyName>Duende.BFF</AssemblyName>
<RootNamespace>Duende.Bff</RootNamespace>
<Description>Backend for frontend (BFF) host for ASP.NET Core</Description>
</PropertyGroup>

Expand All @@ -16,6 +16,6 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Duende.Bff.Blazor" />
<InternalsVisibleTo Include="Duende.BFF.Blazor" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -22,11 +28,20 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Duende.Bff\Duende.Bff.csproj" />
<ProjectReference Include="..\..\src\Duende.Bff.Yarp\Duende.Bff.Yarp.csproj" />
<ProjectReference Include="..\..\src\Bff.Blazor.Client\Bff.Blazor.Client.csproj" />
<ProjectReference Include="..\..\src\Bff.Blazor\Bff.Blazor.csproj" />
<ProjectReference Include="..\..\src\Bff.EntityFramework\Bff.EntityFramework.csproj" />
<ProjectReference Include="..\..\src\Bff\Bff.csproj" />
<ProjectReference Include="..\..\src\Bff.Yarp\Bff.Yarp.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>

</Project>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Security.Claims;
using System.Threading.Tasks;
using Duende.AccessTokenManagement.OpenIdConnect;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit d5ba089

Please sign in to comment.