Skip to content

Commit

Permalink
Merge branch 'release/v7.46.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cleftheris committed Nov 27, 2024
2 parents 8ab35e0 + 02176ac commit f527621
Show file tree
Hide file tree
Showing 593 changed files with 22,810 additions and 9,485 deletions.
10 changes: 9 additions & 1 deletion Indice.Platform.sln
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
# 17
VisualStudioVersion = 17.0.31912.275
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Indice.AspNet", "src\Indice.AspNet\Indice.AspNet.csproj", "{79DC5373-B0EC-4C08-AB21-C37B0E691C82}"
Expand All @@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".misc", ".misc", "{B8EB253B
.editorconfig = .editorconfig
.gitignore = .gitignore
appveyor.yml = appveyor.yml
global.json = global.json
LICENSE = LICENSE
local-feed.ps1 = local-feed.ps1
NuGet.config = NuGet.config
Expand Down Expand Up @@ -126,6 +127,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{3244
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Indice.EcmaScript.Tests", "test\Indice.EcmaScript.Tests\Indice.EcmaScript.Tests.csproj", "{BC1A086C-EE56-4323-BC51-F7590B2DBA1F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Indice.AspNetCore.Builder", "src\Indice.AspNetCore.Builder\Indice.AspNetCore.Builder.csproj", "{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -324,6 +327,10 @@ Global
{BC1A086C-EE56-4323-BC51-F7590B2DBA1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC1A086C-EE56-4323-BC51-F7590B2DBA1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC1A086C-EE56-4323-BC51-F7590B2DBA1F}.Release|Any CPU.Build.0 = Release|Any CPU
{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -375,6 +382,7 @@ Global
{51E64F18-5DED-4896-90A7-7F37794629FE} = {643960D9-48C5-4EA3-BED5-486CCC694947}
{9A54D5CE-7425-48BD-9344-5C907E8FAD1D} = {643960D9-48C5-4EA3-BED5-486CCC694947}
{BC1A086C-EE56-4323-BC51-F7590B2DBA1F} = {613A1373-9A47-42DD-A076-7F310D0440B9}
{04C0B75E-2C67-4BBA-8A80-B0936F7D06DE} = {643960D9-48C5-4EA3-BED5-486CCC694947}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2B9151E-8A85-444E-93A9-78264FD0FE4A}
Expand Down
3 changes: 2 additions & 1 deletion Indice.Platform.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"src\\Indice.AspNetCore.Authentication.GovGr\\Indice.AspNetCore.Authentication.GovGr.csproj",
"src\\Indice.AspNetCore.EmbeddedUI\\Indice.AspNetCore.EmbeddedUI.csproj",
"src\\Indice.AspNetCore.Identity\\Indice.AspNetCore.Identity.csproj",
"src\\Indice.AspNetCore\\Indice.AspNetCore.csproj",
"src\\Indice.AspNetCore\\Indice.AspNetCore.csproj",
"src\\Indice.AspNetCore.Builder\\Indice.AspNetCore.Builder.csproj",
"src\\Indice.AspNet\\Indice.AspNet.csproj",
"src\\Indice.Common\\Indice.Common.csproj",
"src\\Indice.EntityFrameworkCore\\Indice.EntityFrameworkCore.csproj",
Expand Down
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "8.0.300"
"version": "8.0.300",
"rollForward": "latestFeature"
}
}
1 change: 1 addition & 0 deletions pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dotnet pack src/Indice.AspNetCore.Authentication.GovGr/Indice.AspNetCore.Authent
dotnet pack src/Indice.AspNetCore.EmbeddedUI/Indice.AspNetCore.EmbeddedUI.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.AspNetCore.Identity/Indice.AspNetCore.Identity.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.AspNetCore/Indice.AspNetCore.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.AspNetCore.Builder/Indice.AspNetCore.Builder.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.Common/Indice.Common.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.EntityFrameworkCore/Indice.EntityFrameworkCore.csproj --no-restore --no-build -c Release -o ./artifacts
dotnet pack src/Indice.Extensions.Configuration.Database/Indice.Extensions.Configuration.Database.csproj --no-restore --no-build -c Release -o ./artifacts
Expand Down
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup Label="Assembly Common">
<Copyright>Copyright (c) 2018 Indice</Copyright>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<VersionPrefixBase>7.28</VersionPrefixBase>
<VersionPrefixBase>7.46</VersionPrefixBase>
<VersionPrefixCore>$(VersionPrefixBase).0</VersionPrefixCore>
<VersionPrefixIdentity>$(VersionPrefixBase).0</VersionPrefixIdentity>
<VersionPrefixIdentityUI>$(VersionPrefixBase).0</VersionPrefixIdentityUI>
Expand All @@ -12,6 +12,7 @@
<VersionPrefixRisk>$(VersionPrefixBase).0</VersionPrefixRisk>
<VersionPrefixMedia>$(VersionPrefixBase).0</VersionPrefixMedia>
<VersionPrefixGovGr>$(VersionPrefixBase).0</VersionPrefixGovGr>
<VersionPrefixAspNet>$(VersionPrefixBase).0</VersionPrefixAspNet>
<VersionPrefix>$(VersionPrefixBase).0</VersionPrefix>
<!--<VersionSuffix>beta-01</VersionSuffix>-->
<Authors>Constantinos Leftheris, Georgios Manoltzas</Authors>
Expand Down
32 changes: 32 additions & 0 deletions src/Indice.AspNetCore.Builder/Indice.AspNetCore.Builder.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Package">
<PackageTags>AspNetCore;WebApplicationBuilder</PackageTags>
<PackageReleaseNotes>Create preconfigured minimal api Builder.</PackageReleaseNotes>
<VersionPrefix>$(VersionPrefixAspNet)</VersionPrefix>
<TargetFrameworks>net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Indice.AspNetCore" Version="$(VersionPrefixCore)" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.7.0" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.2.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Resources.Container" Version="1.0.0-beta.9" />
<PackageReference Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="6.2.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Indice.AspNetCore\Indice.AspNetCore.csproj" />
</ItemGroup>
</Project>
97 changes: 97 additions & 0 deletions src/Indice.AspNetCore.Builder/IndiceWebApplicationBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
using Indice.AspNetCore.Middleware;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Rewrite;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.Metrics;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

namespace Microsoft.AspNetCore.Builder;

/// <summary>
/// A builder for web applications and services that has all the indice defaults preconfigured. This is a decorator for the inner <seealso cref="WebApplicationBuilder"/>
/// </summary>
public class IndiceWebApplicationBuilder : IHostApplicationBuilder
{
private WebApplicationBuilder InnerBuilder { get; }

/// <summary>
/// constructs the <see cref="IndiceWebApplicationBuilder "/> given the inner builder.
/// </summary>
/// <param name="innerBuilder"></param>
internal IndiceWebApplicationBuilder(WebApplicationBuilder innerBuilder) {
InnerBuilder = innerBuilder;
}

/// <inheritdoc/>
public IConfigurationManager Configuration => InnerBuilder.Configuration;

/// <inheritdoc/>
public IHostEnvironment Environment => InnerBuilder.Environment;

/// <inheritdoc/>
public ILoggingBuilder Logging => InnerBuilder.Logging;

/// <inheritdoc/>
public IMetricsBuilder Metrics => InnerBuilder.Metrics;

/// <inheritdoc/>
IDictionary<object, object> IHostApplicationBuilder.Properties => ((IHostApplicationBuilder)InnerBuilder).Properties;

/// <inheritdoc/>
public IServiceCollection Services => InnerBuilder.Services;

/// <inheritdoc/>
void IHostApplicationBuilder.ConfigureContainer<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory, Action<TContainerBuilder>? configure) =>
((IHostApplicationBuilder)InnerBuilder).ConfigureContainer(factory, configure);

/// <summary>
/// Builds the <see cref="WebApplication"/>.
/// </summary>
/// <returns>A configured <see cref="WebApplication"/>.</returns>
public WebApplication BuildDefault() => InnerBuilder.Build();

/// <summary>
/// Builds the <see cref="WebApplication"/> to the idice specifications.
/// </summary>
/// <returns>A configured <see cref="WebApplication"/>.</returns>
public WebApplication Build() {
var app = InnerBuilder.Build();

if (app.Configuration.ProxyEnabled()) {
app.UseForwardedHeaders();
app.UseHttpMethodOverride();
}

app.UseExceptionHandler();
app.UseStatusCodePages();
app.UseAuthentication();
app.UseAuthorization();
if (app.Environment.IsDevelopment()) {
app.UseDeveloperExceptionPage();
}
if (app.Configuration.UseRedirectToHost()) {
var rewrite = new RewriteOptions();
rewrite.Rules.Add(new RedirectToHostRewriteRule(app.Configuration.GetHost()));
app.UseRewriter(rewrite);
}
if (app.Configuration.UseHttpsRedirection()) {
app.UseHttpsRedirection();
}
if (app.Configuration.HstsEnabled()) {
app.UseHsts();
}
app.UseRequestLocalization();
app.UseCors();
return app;
}

/// <summary>
/// Initializes a new instance of the <see cref="WebApplication"/> class with preconfigured defaults.
/// </summary>
/// <param name="args">The command line arguments.</param>
/// <returns>The <see cref="WebApplication"/>.</returns>
public static IndiceWebApplicationBuilder CreateBuilder(string[] args) =>
new(WebApplication.CreateBuilder(args).AddMinimalApiDefaults());
}
Loading

0 comments on commit f527621

Please sign in to comment.