version bumps
This commit is contained in:
@ -9,6 +9,6 @@
|
|||||||
<InformationalVersion>1.0.7+Branch.main.Sha.3695c1742965d93eba0ad851656cfaa3e44ba327</InformationalVersion>
|
<InformationalVersion>1.0.7+Branch.main.Sha.3695c1742965d93eba0ad851656cfaa3e44ba327</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -17,10 +17,6 @@ namespace isn
|
|||||||
{
|
{
|
||||||
var json = File.ReadAllText(cfgSettingIf.FullName);
|
var json = File.ReadAllText(cfgSettingIf.FullName);
|
||||||
settings = JsonConvert.DeserializeObject<Settings>(json);
|
settings = JsonConvert.DeserializeObject<Settings>(json);
|
||||||
if (settings.DefaultSourceKey == null)
|
|
||||||
{
|
|
||||||
Settings.DefaultSourceKey = settings.Sources.Keys.FirstOrDefault();
|
|
||||||
}
|
|
||||||
CurrentSource = settings.DefaultSourceKey;
|
CurrentSource = settings.DefaultSourceKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,9 @@ namespace isn
|
|||||||
/// Protected API Key
|
/// Protected API Key
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value></value>
|
/// <value></value>
|
||||||
public string ApiKey { get; set; }
|
public string ProtectedApiKey { get; set; }
|
||||||
|
|
||||||
|
public string ApiKey { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Key alias
|
/// Key alias
|
||||||
@ -22,19 +24,19 @@ namespace isn
|
|||||||
|
|
||||||
public string GetClearApiKey()
|
public string GetClearApiKey()
|
||||||
{
|
{
|
||||||
return Protector.UnProtect(ApiKey);
|
if (!string.IsNullOrEmpty(ApiKey)) return ApiKey;
|
||||||
|
return ProtectedApiKey = Protector.UnProtect(ApiKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetApiKey(string key)
|
public void SetApiKey(string key)
|
||||||
{
|
{
|
||||||
ApiKey = Protector.Protect(key);
|
ApiKey = key;
|
||||||
|
ProtectedApiKey = Protector.Protect(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IDataProtector Protector { get; set; } = new DefaultDataProtector();
|
public static IDataProtector Protector { get; private set ; } = new DefaultDataProtector();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Settings
|
public class Settings
|
||||||
{
|
{
|
||||||
public string DataProtectionTitle { get; set; }
|
public string DataProtectionTitle { get; set; }
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
<InformationalVersion>1.0.7+Branch.main.Sha.3695c1742965d93eba0ad851656cfaa3e44ba327</InformationalVersion>
|
<InformationalVersion>1.0.7+Branch.main.Sha.3695c1742965d93eba0ad851656cfaa3e44ba327</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="7.0.1" />
|
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="8.0.0" />
|
||||||
<PackageReference Include="Mono.Options" Version="5.3.0" />
|
<PackageReference Include="Mono.Options" Version="5.3.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="unleash.client" Version="1.6.1" />
|
<PackageReference Include="unleash.client" Version="4.1.6" />
|
||||||
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*" />
|
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
|
||||||
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -13,32 +13,32 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.15" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.15" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.4">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.5" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.11" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="7.0.15" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.3" IncludeAssets="All" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.15" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.15" />
|
||||||
|
|
||||||
<PackageReference Include="NuGet.Packaging.Core" Version="6.5.0" />
|
<PackageReference Include="NuGet.Packaging.Core" Version="6.8.0" />
|
||||||
<PackageReference Include="MailKit" Version="3.6.0" />
|
<PackageReference Include="MailKit" Version="4.3.0" />
|
||||||
<PackageReference Include="unleash.client" Version="2.4.3" />
|
<PackageReference Include="unleash.client" Version="4.1.6" />
|
||||||
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
|
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
|
||||||
<PrivateAssets>All</PrivateAssets>
|
<PrivateAssets>All</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="7.0.1" />
|
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="2.2.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.4" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.15" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
||||||
|
@ -43,6 +43,7 @@ namespace isn.tests
|
|||||||
Assert.NotNull(vm);
|
Assert.NotNull(vm);
|
||||||
Assert.NotNull(vm.Resources);
|
Assert.NotNull(vm.Resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void TestPush()
|
public void TestPush()
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@ namespace isnd.host.tests
|
|||||||
var dbContext = services.GetRequiredService<ApplicationDbContext>();
|
var dbContext = services.GetRequiredService<ApplicationDbContext>();
|
||||||
var paul = dbContext.Users.FirstOrDefaultAsync
|
var paul = dbContext.Users.FirstOrDefaultAsync
|
||||||
(u => u.Email == "paul@pschneider.fr").Result;
|
(u => u.Email == "paul@pschneider.fr").Result;
|
||||||
if (paul!=null)
|
if (paul != null)
|
||||||
{
|
{
|
||||||
dbContext.Users.Remove(paul);
|
dbContext.Users.Remove(paul);
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
@ -62,17 +62,18 @@ namespace isnd.host.tests
|
|||||||
public void NugetInstallsTest()
|
public void NugetInstallsTest()
|
||||||
{
|
{
|
||||||
using (var serviceScope = server.Host.Services.CreateScope())
|
using (var serviceScope = server.Host.Services.CreateScope())
|
||||||
{ var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
{
|
||||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||||
ProcessStartInfo psi = new ProcessStartInfo("nuget");
|
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||||
psi.ArgumentList.Add("install");
|
ProcessStartInfo psi = new ProcessStartInfo("nuget");
|
||||||
psi.ArgumentList.Add("gitversion");
|
psi.ArgumentList.Add("install");
|
||||||
psi.ArgumentList.Add("-PreRelease");
|
psi.ArgumentList.Add("gitversion");
|
||||||
psi.ArgumentList.Add("-Source");
|
psi.ArgumentList.Add("-PreRelease");
|
||||||
psi.ArgumentList.Add(pkgSourceUrl);
|
psi.ArgumentList.Add("-Source");
|
||||||
Process p = Process.Start(psi);
|
psi.ArgumentList.Add(pkgSourceUrl);
|
||||||
p.WaitForExit();
|
Process p = Process.Start(psi);
|
||||||
Assert.True(p.ExitCode == 0, "nuget install failed!");
|
p.WaitForExit();
|
||||||
|
Assert.True(p.ExitCode == 0, "nuget install failed!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,14 +81,15 @@ namespace isnd.host.tests
|
|||||||
public void TestRegistrationV3Resource()
|
public void TestRegistrationV3Resource()
|
||||||
{
|
{
|
||||||
using (var serviceScope = server.Host.Services.CreateScope())
|
using (var serviceScope = server.Host.Services.CreateScope())
|
||||||
{ var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
{
|
||||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||||
NullThrottle throttle = new NullThrottle();
|
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||||
|
NullThrottle throttle = new NullThrottle();
|
||||||
|
|
||||||
PackageSource packageSource = new PackageSource(pkgSourceUrl);
|
PackageSource packageSource = new PackageSource(pkgSourceUrl);
|
||||||
HttpSource client = new HttpSource(packageSource, PkgSourceMessageHandler, throttle);
|
HttpSource client = new HttpSource(packageSource, PkgSourceMessageHandler, throttle);
|
||||||
NuGet.Protocol.RegistrationResourceV3 res = new NuGet.Protocol.RegistrationResourceV3(client ,
|
NuGet.Protocol.RegistrationResourceV3 res = new NuGet.Protocol.RegistrationResourceV3(client,
|
||||||
new Uri(isnSettings.ExternalUrl + Constants.ApiVersionPrefix + "/registration"));
|
new Uri(isnSettings.ExternalUrl + Constants.ApiVersionPrefix + "/registration"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,11 +99,11 @@ namespace isnd.host.tests
|
|||||||
using (var serviceScope = server.Host.Services.CreateScope())
|
using (var serviceScope = server.Host.Services.CreateScope())
|
||||||
{
|
{
|
||||||
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||||
var prov = new RegistrationResourceV3Provider();
|
var prov = new RegistrationResourceV3Provider();
|
||||||
var source = new PackageSource(pkgSourceUrl);
|
var source = new PackageSource(pkgSourceUrl);
|
||||||
var repo = new SourceRepository(source, new INuGetResourceProvider[]{ prov });
|
var repo = new SourceRepository(source, new INuGetResourceProvider[] { prov });
|
||||||
prov.TryCreate(repo, CancellationToken.None);
|
prov.TryCreate(repo, CancellationToken.None);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,7 +112,8 @@ namespace isnd.host.tests
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
public string SPIIndexURI {
|
public string SPIIndexURI
|
||||||
|
{
|
||||||
get => server.Addresses.First() + "/v3/index";
|
get => server.Addresses.First() + "/v3/index";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
<Version>1.0.7</Version>
|
<Version>1.0.7</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||||
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
|
<PackageReference Include="XunitXml.TestLogger" Version="3.1.20" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.reporters" Version="2.6.6" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
|
||||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.2" PrivateAssets="All" />
|
<PackageToolReference Include="xunit.runner.console" Version="2.4.2" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Reference in New Issue
Block a user