mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
feat: add multiple package sync sources and API integration
- Added undici dependency and implemented three package fetcher variants (simple text parsing, v2 with better error handling, and official repository sync) - Integrated real API calls in PlatformSelector and PackageBrowser components with fallback to mock data - Extended sync API route to support multiple data sources (debian-simple, ubuntu-simple, debian-official-v2, etc.) with platform initialization
This commit is contained in:
+17
-11
@@ -3,6 +3,7 @@ export interface Platform {
|
||||
name: string
|
||||
packageManager: string
|
||||
icon: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface Package {
|
||||
@@ -10,24 +11,29 @@ export interface Package {
|
||||
name: string
|
||||
description: string
|
||||
version: string
|
||||
category: string
|
||||
license: string
|
||||
category?: string
|
||||
license?: string
|
||||
type: 'gui' | 'cli'
|
||||
platform: string
|
||||
platform?: string | Platform
|
||||
platform_id?: string
|
||||
repository: 'official' | 'third-party'
|
||||
lastUpdated: string
|
||||
lastUpdated?: string
|
||||
downloads?: number
|
||||
popularity?: number
|
||||
tags: string[]
|
||||
popularity_score?: number
|
||||
tags?: string[]
|
||||
}
|
||||
|
||||
export interface FilterOptions {
|
||||
platforms: string[]
|
||||
categories: string[]
|
||||
licenses: string[]
|
||||
types: ('gui' | 'cli')[]
|
||||
repositories: ('official' | 'third-party')[]
|
||||
searchQuery: string
|
||||
platform_id?: string
|
||||
category_id?: number
|
||||
type?: 'gui' | 'cli'
|
||||
repository?: 'official' | 'third-party'
|
||||
search?: string
|
||||
limit?: number
|
||||
offset?: number
|
||||
sort_by?: string
|
||||
sort_order?: 'asc' | 'desc'
|
||||
}
|
||||
|
||||
export interface SelectedPackage extends Package {
|
||||
|
||||
Reference in New Issue
Block a user