chore: remove debug endpoints and update configuration

- Removed debug-packages and test-sync API endpoints no longer needed
- Extracted sync status management into shared lib/sync/status module
- Updated Next.js config to remove deprecated experimental appDir flag
- Added port specification to production start script for consistency
This commit is contained in:
Yusuf İpek
2025-11-11 17:19:34 +03:00
parent b37373e807
commit cc82888c74
10 changed files with 54 additions and 187 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ CREATE TABLE packages (
id VARCHAR(100) PRIMARY KEY,
name VARCHAR(255) NOT NULL,
description TEXT,
version VARCHAR(50),
version VARCHAR(255),
platform_id VARCHAR(50) NOT NULL REFERENCES platforms(id),
category_id INTEGER REFERENCES categories(id),
license_id INTEGER REFERENCES licenses(id),
+19
View File
@@ -0,0 +1,19 @@
// Global sync state (in production, use Redis or database)
let syncInProgress = false
let syncProgress = { message: '', progress: 0, total: 100 }
// Export functions for other endpoints to use
export function setSyncProgress(message: string, progress?: number, total?: number) {
syncProgress = { message, progress: progress || 0, total: total || 100 }
}
export function setSyncInProgress(inProgress: boolean) {
syncInProgress = inProgress
}
export function getSyncStatus() {
return {
inProgress: syncInProgress,
progress: syncProgress
}
}