WIP Page leaf
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,3 +17,5 @@ appsettings.Development.json
|
|||||||
/src/isn.abst/bin
|
/src/isn.abst/bin
|
||||||
/src/isn.abst/obj
|
/src/isn.abst/obj
|
||||||
/src/isnd/packages/
|
/src/isnd/packages/
|
||||||
|
test/data/test-isn/bin/
|
||||||
|
test/data/test-isn/obj
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"omnisharp.msbuild": true,
|
"omnisharp.msbuild": true,
|
||||||
"dotnet-test-explorer.testProjectPath": "**/*Tests.csproj",
|
"dotnet-test-explorer.testProjectPath": "**/*tests.csproj",
|
||||||
"dotnet-test-explorer.runInParallel": false,
|
"dotnet-test-explorer.runInParallel": false,
|
||||||
"dotnet-test-explorer.showCodeLens": true,
|
"dotnet-test-explorer.showCodeLens": true,
|
||||||
"dotnet-test-explorer.testArguments": "",
|
"dotnet-test-explorer.testArguments": "",
|
||||||
|
@ -50,15 +50,16 @@ namespace isnd.Controllers
|
|||||||
|
|
||||||
if (pkgvs.Count() == 0) return NotFound();
|
if (pkgvs.Count() == 0) return NotFound();
|
||||||
|
|
||||||
List<string> types = pkgvs.Select(
|
List<string> types = pkgvs
|
||||||
|
.Select(
|
||||||
v => v.Type ?? "Dependency"
|
v => v.Type ?? "Dependency"
|
||||||
).Distinct().ToList();
|
)
|
||||||
|
.Distinct().ToList();
|
||||||
if (!types.Contains("PackageDelete"))
|
if (!types.Contains("PackageDelete"))
|
||||||
types.Add("PackageDetails");
|
types.Add("PackageDetails");
|
||||||
|
|
||||||
var last = pkgvs.Last();
|
var last = pkgvs.Last();
|
||||||
var pub = last.Package.CommitTimeStamp;
|
var pub = last.LatestCommit.CommitTimeStamp;
|
||||||
var firstpub = pkgvs.First().Package.CommitTimeStamp;
|
|
||||||
|
|
||||||
return Ok(new Data.Packages.Catalog.CatalogLeaf
|
return Ok(new Data.Packages.Catalog.CatalogLeaf
|
||||||
{
|
{
|
||||||
|
@ -127,6 +127,7 @@ namespace isnd.Services
|
|||||||
{
|
{
|
||||||
|
|
||||||
var scope = dbContext.Packages
|
var scope = dbContext.Packages
|
||||||
|
.Include(p=>p.Versions)
|
||||||
.Where(
|
.Where(
|
||||||
p => (PackageIdHelpers.CamelCaseMatch(p.Id, query) || PackageIdHelpers.SeparatedByMinusMatch(p.Id, query))
|
p => (PackageIdHelpers.CamelCaseMatch(p.Id, query) || PackageIdHelpers.SeparatedByMinusMatch(p.Id, query))
|
||||||
&& (prerelease || p.Versions.Any(v => !v.IsPrerelease))
|
&& (prerelease || p.Versions.Any(v => !v.IsPrerelease))
|
||||||
@ -142,6 +143,14 @@ namespace isnd.Services
|
|||||||
Data = pkgs
|
Data = pkgs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private object PackageVersionToRegentry(Package v)
|
||||||
|
{
|
||||||
|
return new {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
public AutoCompleteResult AutoComplete(string id,
|
public AutoCompleteResult AutoComplete(string id,
|
||||||
int skip, int take, bool prerelease = false,
|
int skip, int take, bool prerelease = false,
|
||||||
string packageType = null)
|
string packageType = null)
|
||||||
@ -332,6 +341,7 @@ namespace isnd.Services
|
|||||||
{
|
{
|
||||||
return dbContext.PackageVersions
|
return dbContext.PackageVersions
|
||||||
.Include(v => v.Package)
|
.Include(v => v.Package)
|
||||||
|
.Include(v => v.LatestCommit)
|
||||||
.Where(v => v.PackageId == id && v.FullString == version
|
.Where(v => v.PackageId == id && v.FullString == version
|
||||||
&& (lower == null || lower == v.Type));
|
&& (lower == null || lower == v.Type));
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,8 @@ namespace isnd
|
|||||||
ApplicationDbContext dbContext)
|
ApplicationDbContext dbContext)
|
||||||
{
|
{
|
||||||
app.UseForwardedHeaders();
|
app.UseForwardedHeaders();
|
||||||
// if have a cert : app.UseHttpsRedirection();
|
// Not using Apache cert :
|
||||||
|
// app.UseHttpsRedirection();
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
|
8
test/data/test-isn/NuGet.Config
Normal file
8
test/data/test-isn/NuGet.Config
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<apikeys>
|
||||||
|
</apikeys>
|
||||||
|
<packageSources>
|
||||||
|
<add key="isn-dev" value="http://localhost:5000/index.json" protocolVersion="3" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
2
test/data/test-isn/Program.cs
Normal file
2
test/data/test-isn/Program.cs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
Console.WriteLine("Hello, World!");
|
4
test/data/test-isn/isn-test.sh
Executable file
4
test/data/test-isn/isn-test.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
nuget locals all -clear && dotnet nuget locals all --clear && nuget add Yavsc.Abstract -Config NuGet.Config -Source isn-dev
|
||||||
|
|
11
test/data/test-isn/test-isn.csproj
Normal file
11
test/data/test-isn/test-isn.csproj
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<RootNamespace>test_isn</RootNamespace>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
1
test/data/test-isn/testcmd
Normal file
1
test/data/test-isn/testcmd
Normal file
@ -0,0 +1 @@
|
|||||||
|
nuget install -NoCache -Verbosity detailed -ConfigFile NuGet.Config Yavsc.Abstract
|
Reference in New Issue
Block a user