// 進入點:載入設定、建立 Gitea 客戶端,依序清理舊成品與孤立 tag。 import { loadConfig } from './config.js' import { GiteaClient } from './gitea-client.js' import { cleanupReleases } from './releases.js' import { cleanupOrphanTags } from './tags.js' import { separator, fail } from './logger.js' async function main() { const config = loadConfig() const client = new GiteaClient({ token: config.token }) await cleanupReleases(client, config) await cleanupOrphanTags(client, config) separator() } main().catch((error) => { fail(error.message) process.exit(1) })