feat: categories and option search

This commit is contained in:
2025-03-15 15:32:45 +00:00
parent 97831caf75
commit 08d6a2a2fe
11 changed files with 214 additions and 33 deletions

View File

@ -9,6 +9,8 @@ pub struct V1Package {
pub owner: String,
pub package_url: String,
pub is_deprecated: bool,
pub has_nsfw_content: bool,
pub categories: Vec<String>,
pub versions: Vec<V1Version>,
}

View File

@ -49,7 +49,9 @@ pub struct Remote {
pub package_url: String,
pub download_url: String,
pub deprecated: bool,
pub dependencies: BTreeSet<PkgKey>
pub nsfw: bool,
pub categories: Vec<String>,
pub dependencies: BTreeSet<PkgKey>,
}
impl Package {
@ -70,7 +72,9 @@ impl Package {
package_url: p.package_url,
download_url: v.download_url,
deprecated: p.is_deprecated,
nsfw: p.has_nsfw_content,
version: v.version_number,
categories: p.categories,
dependencies: Self::sanitize_deps(v.dependencies)
})
})