@ -6,7 +6,8 @@ using System.Threading.Tasks;
using isn.Abstract ;
using isnd.Controllers ;
using isnd.Data ;
using isnd.Data.Catalog ;
using isnd.Data.Packages ;
using isnd.Data.Packages.Catalog ;
using isnd.Entities ;
using isnd.Helpers ;
using isnd.Interfaces ;
@ -48,7 +49,7 @@ namespace isnd.Services
Comment = "Package Publish service"
} ) ;
// under dev, only leash in release mode
if ( unleashClient . IsEnabled ( "pkg-get" , fals e) )
if ( unleashClient . IsEnabled ( "pkg-get" , tru e) )
res . Add (
new Resource
{
@ -56,7 +57,7 @@ namespace isnd.Services
Type = "PackageBaseAddress/3.0.0" ,
Comment = "Package Base Address service"
} ) ;
if ( unleashClient . IsEnabled ( "pkg-autocomplete" , fals e) )
if ( unleashClient . IsEnabled ( "pkg-autocomplete" , tru e) )
res . Add (
new Resource
{
@ -72,7 +73,7 @@ namespace isnd.Services
Type = "SearchQueryService/" + BASE_API_LEVEL ,
Comment = "Search Query service"
} ) ;
if ( unleashClient . IsEnabled ( "pkg-catalog" , fals e) )
if ( unleashClient . IsEnabled ( "pkg-catalog" , tru e) )
res . Add (
new Resource
{
@ -81,13 +82,42 @@ namespace isnd.Services
Comment = "Package Catalog Index"
} ) ;
/ * FIXME res . Add (
/* FIXME */
res . Add (
new Resource
{
Id = extUrl + ApiConfig . Registration ,
Id = extUrl + "v" + BASE_API_LEVEL + "/" + ApiConfig . Registration ,
Type = "RegistrationsBaseUrl" ,
Comment = "Base URL of storage where isn package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
} ) ;
res . Add (
new Resource
{
Id = extUrl + "v3.0.0-beta/" + ApiConfig . Registration ,
Type = "RegistrationsBaseUrl/3.0.0-beta" ,
Comment = "Base URL of storage where isn package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
} ) ;
res . Add (
new Resource
{
Id = extUrl + "v3.0.0-rc/" + ApiConfig . Registration ,
Type = "RegistrationsBaseUrl/3.0.0-rc" ,
Comment = "Base URL of storage where isn package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
} ) ;
res . Add ( new Resource
{
Id = extUrl + "v3.4.0/" + ApiConfig . Registration ,
Type = "RegistrationsBaseUrl/3.4.0" ,
Comment = "Base URL of storage where isn package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
} ) ;
res . Add ( new Resource
{
Id = extUrl + "v3.6.0/" + ApiConfig . Registration ,
Type = "RegistrationsBaseUrl/3.6.0" ,
Comment = "Base URL of storage where isn package registration info is stored in GZIP format. This base URL includes SemVer 2.0.0 packages."
} ) ; * /
} ) ;
return res ;
}
@ -97,7 +127,6 @@ 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 ) )
@ -258,7 +287,8 @@ namespace isnd.Services
public async Task < PackageDeletionReport > DeletePackageAsync ( string pkgid , string version , string type )
{
// TODO deletion on disk
var commit = new Commit {
var commit = new Commit
{
Action = PackageAction . DeletePackage ,
TimeStamp = DateTime . Now
} ;