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:
Yusuf İpek
2025-11-10 19:12:46 +03:00
parent 596bba0832
commit 08f35aedbc
25 changed files with 2152 additions and 102 deletions
+17 -11
View File
@@ -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 {