WIP Page leaf

broken/ef
Paul Schneider 2 years ago
parent 7f9984b059
commit fa9a12ad49
10 changed files with 47 additions and 7 deletions

2
.gitignore vendored

@ -17,3 +17,5 @@ appsettings.Development.json
/src/isn.abst/bin
/src/isn.abst/obj
/src/isnd/packages/
test/data/test-isn/bin/
test/data/test-isn/obj

@ -1,6 +1,6 @@
{
"omnisharp.msbuild": true,
"dotnet-test-explorer.testProjectPath": "**/*Tests.csproj",
"dotnet-test-explorer.testProjectPath": "**/*tests.csproj",
"dotnet-test-explorer.runInParallel": false,
"dotnet-test-explorer.showCodeLens": true,
"dotnet-test-explorer.testArguments": "",

@ -50,15 +50,16 @@ namespace isnd.Controllers
if (pkgvs.Count() == 0) return NotFound();
List<string> types = pkgvs.Select(
List<string> types = pkgvs
.Select(
v => v.Type ?? "Dependency"
).Distinct().ToList();
)
.Distinct().ToList();
if (!types.Contains("PackageDelete"))
types.Add("PackageDetails");
var last = pkgvs.Last();
var pub = last.Package.CommitTimeStamp;
var firstpub = pkgvs.First().Package.CommitTimeStamp;
var pub = last.LatestCommit.CommitTimeStamp;
return Ok(new Data.Packages.Catalog.CatalogLeaf
{

@ -127,6 +127,7 @@ namespace isnd.Services
{
var scope = dbContext.Packages
.Include(p=>p.Versions)
.Where(
p => (PackageIdHelpers.CamelCaseMatch(p.Id, query) || PackageIdHelpers.SeparatedByMinusMatch(p.Id, query))
&& (prerelease || p.Versions.Any(v => !v.IsPrerelease))
@ -134,14 +135,22 @@ namespace isnd.Services
);
var total = scope.Count();
var pkgs = scope.Skip(skip).Take(take).ToArray();
return new PackageIndexViewModel
{
Query = query,
TotalHits = total,
Data = pkgs
};
}
private object PackageVersionToRegentry(Package v)
{
return new {
};
}
public AutoCompleteResult AutoComplete(string id,
int skip, int take, bool prerelease = false,
string packageType = null)
@ -332,6 +341,7 @@ namespace isnd.Services
{
return dbContext.PackageVersions
.Include(v => v.Package)
.Include(v => v.LatestCommit)
.Where(v => v.PackageId == id && v.FullString == version
&& (lower == null || lower == v.Type));
}

@ -110,7 +110,8 @@ namespace isnd
ApplicationDbContext dbContext)
{
app.UseForwardedHeaders();
// if have a cert : app.UseHttpsRedirection();
// Not using Apache cert :
// app.UseHttpsRedirection();
if (env.IsDevelopment())
{

@ -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>

@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

@ -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

@ -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>

@ -0,0 +1 @@
nuget install -NoCache -Verbosity detailed -ConfigFile NuGet.Config Yavsc.Abstract
Loading…