Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/KannanKrish/BaGet
Browse files Browse the repository at this point in the history
  • Loading branch information
VAllens committed Aug 31, 2023
2 parents 5a8502c + 961046d commit 51f5761
Show file tree
Hide file tree
Showing 303 changed files with 11,610 additions and 12,908 deletions.
96 changes: 0 additions & 96 deletions .editorconfig

This file was deleted.

7 changes: 3 additions & 4 deletions BaGet.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29104.9
# Visual Studio Version 17
VisualStudioVersion = 17.4.32804.182
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaGet", "src\BaGet\BaGet.csproj", "{284366CB-C68F-473E-908A-50A382616AE0}"
EndProject
Expand All @@ -25,7 +25,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaGet.Aws", "src\BaGet.Aws\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0B44364D-952B-497A-82E0-C9AAE94E0369}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
src\Directory.Build.props = src\Directory.Build.props
nuget.config = nuget.config
EndProjectSection
Expand All @@ -50,7 +49,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaGet.Aliyun", "src\BaGet.A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaGetWebApplication", "samples\BaGetWebApplication\BaGetWebApplication.csproj", "{E5AFE55D-0932-46A9-BFA3-C8A034037377}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BaGet.Web.Tests", "tests\BaGet.Web.Tests\BaGet.Web.Tests.csproj", "{BEEAAA73-36CD-4178-9C9F-6D036586E7BF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaGet.Web.Tests", "tests\BaGet.Web.Tests\BaGet.Web.Tests.csproj", "{BEEAAA73-36CD-4178-9C9F-6D036586E7BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 2 additions & 0 deletions BaGet.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<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/Naming/CSharpNaming/PredefinedNamingRules/=PublicFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
<NoWarn>IDE0007</NoWarn>
</PropertyGroup>
<IsPackable>false</IsPackable>
<NoWarn>IDE0007</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Protocol\BaGet.Protocol.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Protocol\BaGet.Protocol.csproj" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion samples/BaGet.Protocol.Samples.Tests/Sample02_Search.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using BaGet.Protocol.Models;
using NuGet.Versioning;
using Xunit;

Expand Down
1 change: 0 additions & 1 deletion samples/BaGet.Protocol.Samples.Tests/Sample03_Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BaGet.Protocol.Models;
using NuGet.Versioning;
using Xunit;

Expand Down
12 changes: 12 additions & 0 deletions samples/BaGetWebApplication/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.8",
"commands": [
"dotnet-ef"
]
}
}
}
22 changes: 14 additions & 8 deletions samples/BaGetWebApplication/BaGetWebApplication.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>

<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Database.Sqlite\BaGet.Database.Sqlite.csproj" />
<ProjectReference Include="..\..\src\BaGet.Web\BaGet.Web.csproj" />
</ItemGroup>
<ContainerImageName>brushtailnuget</ContainerImageName>
</PropertyGroup>

</Project>
<ItemGroup>
<ProjectReference Include="..\..\src\BaGet.Database.Sqlite\BaGet.Database.Sqlite.csproj" />
<ProjectReference Include="..\..\src\BaGet.Web\BaGet.Web.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Build.Containers" Version="7.0.302" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions samples/BaGetWebApplication/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Global using directives

global using BaGet;
global using BaGet.Web;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.Extensions.Hosting;
43 changes: 23 additions & 20 deletions samples/BaGetWebApplication/Program.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
using System.Threading.Tasks;
using BaGet.Web;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
var builder = WebApplication.CreateBuilder(args);

namespace BaGetWebApplication
builder.Services.AddBaGetWebApplication(app =>
{
public class Program
{
public static async Task Main(string[] args)
{
var host = CreateHostBuilder(args).Build();
// Use SQLite as BaGet's database and store packages on the local file system.
app.AddSqliteDatabase();
app.AddFileStorage();
});

await host.RunMigrationsAsync();
await host.RunAsync();
}
var app = builder.Build();

public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}

app.UseStaticFiles();
app.UseRouting();

app.UseEndpoints(endpoints =>
{
// Add BaGet's endpoints.
new BaGetEndpointBuilder().MapEndpoints(endpoints);
});

await app.RunMigrationsAsync();

await app.RunAsync();
40 changes: 0 additions & 40 deletions samples/BaGetWebApplication/Startup.cs

This file was deleted.

21 changes: 21 additions & 0 deletions samples/BaGetWebApplication/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
{
"ApiKey": "b2a2c53f-7243-45ae-af13-991cb0bdfed1",
"PackageDeletionBehavior": "HardDelete",
"AllowPackageOverwrites": true,
"Database": {
//"Type": "Sqlite",
"ConnectionString": "Data Source=baget.db"
},
//"Storage": {
// "Type": "FileSystem",
// "Path": "C://inetpub//sites//nuget.brushtailtech.com"
//},
"Search": {
"Type": "Database"
},
"Mirror": {
"Enabled": false,

// Uncomment this to use the NuGet v2 protocol
//"Legacy": true,
"PackageSource": "https://api.nuget.org/v3/index.json"
},
"IISServerOptions": {
"MaxRequestBodySize": 262144000
},

"Logging": {
"LogLevel": {
Expand Down
Loading

0 comments on commit 51f5761

Please sign in to comment.