plugin ui
All checks were successful
Build / Compute Version (push) Successful in 17s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 3m5s
Build / Build Nuget package (NuGet) (push) Successful in 2m34s
Build / Build Nuget package (CringePlugins) (push) Successful in 2m56s
Build / Build Nuget package (SharedCringe) (push) Successful in 1m52s
Build / Build Launcher (push) Successful in 3m52s

This commit is contained in:
zznty
2024-11-03 01:58:04 +07:00
parent 271e8a1dde
commit aac79af331
22 changed files with 573 additions and 40 deletions

View File

@@ -3,7 +3,7 @@ using NuGet.Versioning;
namespace NuGet.Models;
public record CatalogEntry(string Id, NuGetVersion Version, ImmutableArray<DependencyGroup> DependencyGroups, ImmutableArray<string>? PackageTypes,
public record CatalogEntry(string Id, NuGetVersion Version, ImmutableArray<DependencyGroup>? DependencyGroups, ImmutableArray<string>? PackageTypes,
ImmutableArray<CatalogPackageEntry>? PackageEntries);
public record CatalogPackageEntry(string Name, string FullName, long CompressedLength, long Length);

View File

@@ -0,0 +1,8 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization;
using NuGet.Converters;
namespace NuGet.Models;
[JsonConverter(typeof(PackageAuthorsJsonConverter))]
public record PackageAuthors(string Author, ImmutableArray<string> Authors);

View File

@@ -0,0 +1,3 @@
namespace NuGet.Models;
public record PackageType(string Name);

View File

@@ -2,4 +2,4 @@
namespace NuGet.Models;
public record RegistrationPage(int Count, NuGetVersion Lower, NuGetVersion Upper, RegistrationEntry[] Items);
public record RegistrationPage(int Count, NuGetVersion Lower, NuGetVersion Upper, RegistrationEntry[]? Items);

View File

@@ -0,0 +1,33 @@
using System.Collections.Immutable;
using System.Text.Json.Serialization;
using NuGet.Converters;
using NuGet.Versioning;
namespace NuGet.Models;
public record SearchResult(int TotalHits, [property: JsonPropertyName("data")] ImmutableArray<SearchResultEntry> Entries);
public record SearchResultEntry(
string Id,
NuGetVersion Version,
string? Description,
ImmutableArray<SearchResultPackageVersion> Versions,
PackageAuthors? Authors,
string? IconUrl,
string? LicenseUrl,
[property: JsonConverter(typeof(StringOrStringArrayConverter))]
ImmutableArray<string>? Owners,
string? ProjectUrl,
Uri Registration,
string? Summary,
[property: JsonConverter(typeof(StringOrStringArrayConverter))]
ImmutableArray<string>? Tags,
string? Title,
int? TotalDownloads,
ImmutableArray<PackageType> PackageTypes,
bool Verified = false);
public record SearchResultPackageVersion(
NuGetVersion Version,
int Downloads,
[property: JsonPropertyName("@id")] Uri Registration);