Skip to content

Commit 3329c10

Browse files
committed
make things build, don't use automapper commerical
1 parent 5593ec2 commit 3329c10

File tree

7 files changed

+43
-26
lines changed

7 files changed

+43
-26
lines changed

Directory.Packages.props

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project>
22
<ItemGroup>
3-
<PackageVersion Include="AutoMapper" Version="15.0.0" />
3+
<PackageVersion Include="AutoMapper" Version="14.0.0" />
44
<PackageVersion Include="Bullseye" Version="6.0.0" />
5+
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="12.0.0" />
56
<PackageVersion Include="Glob" Version="1.1.9" />
67
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.13" />
78
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.13" />
@@ -16,6 +17,6 @@
1617
<PackageVersion Include="SimpleExec" Version="12.0.0" />
1718
<PackageVersion Include="Swashbuckle.AspNetCore" Version="8.1.4" />
1819
<PackageVersion Include="xunit" Version="2.9.3" />
19-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.1"/>
20+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.1" />
2021
</ItemGroup>
21-
</Project>
22+
</Project>

build.sh

100644100755
File mode changed.

build/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
Target(
1515
Clean,
16-
ForEach("publish", "**/bin", "**/obj"),
16+
["publish", "**/bin", "**/obj"],
1717
dir =>
1818
{
1919
IEnumerable<string> GetDirectories(string d) => Glob.Directories(".", d);
@@ -43,11 +43,11 @@ void RemoveDirectory(string d)
4343
}
4444
);
4545

46-
Target(Build, DependsOn(Format), () => Run("dotnet", "build . -c Release"));
46+
Target(Build, [Format], () => Run("dotnet", "build . -c Release"));
4747

4848
Target(
4949
Test,
50-
DependsOn(Build),
50+
[Build],
5151
() =>
5252
{
5353
IEnumerable<string> GetFiles(string d) => Glob.Files(".", d);
@@ -61,8 +61,8 @@ void RemoveDirectory(string d)
6161

6262
Target(
6363
Publish,
64-
DependsOn(Test),
65-
ForEach("src/Conduit"),
64+
[Test],
65+
["src/Conduit"],
6666
project =>
6767
{
6868
Run(
@@ -72,5 +72,5 @@ void RemoveDirectory(string d)
7272
}
7373
);
7474

75-
Target("default", DependsOn(Publish), () => Console.WriteLine("Done!"));
75+
Target("default", [Publish], () => Console.WriteLine("Done!"));
7676
await RunTargetsAndExitAsync(args);

src/Conduit/Conduit.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<ItemGroup>
33
<PackageReference Include="AutoMapper" />
4+
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" />
45
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
56
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
67
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />

src/Conduit/ServicesExtensions.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Conduit.Infrastructure;
66
using Conduit.Infrastructure.Security;
77
using FluentValidation;
8-
using FluentValidation.AspNetCore;
98
using MediatR;
109
using Microsoft.AspNetCore.Authentication.JwtBearer;
1110
using Microsoft.AspNetCore.Http;
@@ -14,6 +13,7 @@
1413
using Microsoft.IdentityModel.Tokens;
1514
using Serilog;
1615
using Serilog.Sinks.SystemConsole.Themes;
16+
using Details = Conduit.Features.Users.Details;
1717

1818
namespace Conduit;
1919

@@ -30,9 +30,7 @@ public static void AddConduit(this IServiceCollection services)
3030
typeof(DBContextTransactionPipelineBehavior<,>)
3131
);
3232

33-
services.AddFluentValidationAutoValidation();
34-
services.AddFluentValidationClientsideAdapters();
35-
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly());
33+
services.AddValidatorsFromAssemblyContaining<Details.QueryValidator>();
3634

3735
services.AddAutoMapper(typeof(Program));
3836

src/Conduit/packages.lock.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
"net8.0": {
55
"AutoMapper": {
66
"type": "Direct",
7-
"requested": "[15.0.0, )",
8-
"resolved": "15.0.0",
9-
"contentHash": "pIOxis0VM4WGV48heK5Y93wysT2gD+hPQd7xFM23wUKsXJ77otM0ugg/wSeUDGJApvJgS3x6kggfLWhK16+E2g==",
7+
"requested": "[14.0.0, )",
8+
"resolved": "14.0.0",
9+
"contentHash": "OC+1neAPM4oCCqQj3g2GJ2shziNNhOkxmNB9cVS8jtx4JbgmRzLcUOxB9Tsz6cVPHugdkHgCaCrTjjSI0Z5sCQ==",
1010
"dependencies": {
11-
"Microsoft.Extensions.Logging": "8.0.0",
12-
"Microsoft.Extensions.Options": "8.0.0",
13-
"Microsoft.IdentityModel.JsonWebTokens": "8.0.1"
11+
"Microsoft.Extensions.Options": "8.0.0"
1412
}
1513
},
1614
"FluentValidation": {
@@ -19,6 +17,16 @@
1917
"resolved": "12.0.0",
2018
"contentHash": "8NVLxtMUXynRHJIX3Hn1ACovaqZIJASufXIIFkD0EUbcd5PmMsL1xUD5h548gCezJ5BzlITaR9CAMrGe29aWpA=="
2119
},
20+
"FluentValidation.DependencyInjectionExtensions": {
21+
"type": "Direct",
22+
"requested": "[12.0.0, )",
23+
"resolved": "12.0.0",
24+
"contentHash": "B28fBRL1UjhGsBC8fwV6YBZosh+SiU1FxdD7l7p5dGPgRlVI7UnM+Lgzmg+unZtV1Zxzpaw96UY2MYfMaAd8cg==",
25+
"dependencies": {
26+
"FluentValidation": "12.0.0",
27+
"Microsoft.Extensions.Dependencyinjection.Abstractions": "2.1.0"
28+
}
29+
},
2230
"MediatR": {
2331
"type": "Direct",
2432
"requested": "[13.0.0, )",

tests/Conduit.IntegrationTests/packages.lock.json

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,9 @@
584584
"conduit": {
585585
"type": "Project",
586586
"dependencies": {
587-
"AutoMapper": "[15.0.0, )",
587+
"AutoMapper": "[14.0.0, )",
588588
"FluentValidation": "[12.0.0, )",
589+
"FluentValidation.DependencyInjectionExtensions": "[12.0.0, )",
589590
"MediatR": "[13.0.0, )",
590591
"Microsoft.AspNetCore.Authentication.JwtBearer": "[8.0.13, )",
591592
"Microsoft.EntityFrameworkCore.InMemory": "[8.0.13, )",
@@ -599,13 +600,11 @@
599600
},
600601
"AutoMapper": {
601602
"type": "CentralTransitive",
602-
"requested": "[15.0.0, )",
603-
"resolved": "15.0.0",
604-
"contentHash": "pIOxis0VM4WGV48heK5Y93wysT2gD+hPQd7xFM23wUKsXJ77otM0ugg/wSeUDGJApvJgS3x6kggfLWhK16+E2g==",
603+
"requested": "[14.0.0, )",
604+
"resolved": "14.0.0",
605+
"contentHash": "OC+1neAPM4oCCqQj3g2GJ2shziNNhOkxmNB9cVS8jtx4JbgmRzLcUOxB9Tsz6cVPHugdkHgCaCrTjjSI0Z5sCQ==",
605606
"dependencies": {
606-
"Microsoft.Extensions.Logging": "8.0.0",
607-
"Microsoft.Extensions.Options": "8.0.0",
608-
"Microsoft.IdentityModel.JsonWebTokens": "8.0.1"
607+
"Microsoft.Extensions.Options": "8.0.0"
609608
}
610609
},
611610
"FluentValidation": {
@@ -614,6 +613,16 @@
614613
"resolved": "12.0.0",
615614
"contentHash": "8NVLxtMUXynRHJIX3Hn1ACovaqZIJASufXIIFkD0EUbcd5PmMsL1xUD5h548gCezJ5BzlITaR9CAMrGe29aWpA=="
616615
},
616+
"FluentValidation.DependencyInjectionExtensions": {
617+
"type": "CentralTransitive",
618+
"requested": "[12.0.0, )",
619+
"resolved": "12.0.0",
620+
"contentHash": "B28fBRL1UjhGsBC8fwV6YBZosh+SiU1FxdD7l7p5dGPgRlVI7UnM+Lgzmg+unZtV1Zxzpaw96UY2MYfMaAd8cg==",
621+
"dependencies": {
622+
"FluentValidation": "12.0.0",
623+
"Microsoft.Extensions.Dependencyinjection.Abstractions": "2.1.0"
624+
}
625+
},
617626
"MediatR": {
618627
"type": "CentralTransitive",
619628
"requested": "[13.0.0, )",

0 commit comments

Comments
 (0)