Files
ccs/src/cliproxy/binary/index.ts
T
kaitranntt d3c94fe6a2 refactor(cliproxy): modularize binary-manager into binary/ directory
- extract types, version-checker, lifecycle, updater, installer

- extract downloader (verifier), extractors (tar, zip), version-cache

- slim binary-manager.ts from 1080 to 137 lines (87% reduction)

- add barrel export at binary/index.ts
2025-12-19 12:34:48 -05:00

45 lines
1.0 KiB
TypeScript

/**
* Binary Module - Barrel Export
* Re-exports all binary management functionality.
*/
// Types
export type { VersionCache, UpdateCheckResult } from './types';
export { VERSION_CACHE_DURATION_MS, VERSION_PIN_FILE, GITHUB_API_LATEST_RELEASE } from './types';
// Downloader
export { downloadFile, downloadWithRetry, fetchText, fetchJson } from './downloader';
// Verifier
export { computeChecksum, parseChecksum, verifyChecksum } from './verifier';
// Version Cache
export {
getVersionCachePath,
getVersionPinPath,
readVersionCache,
writeVersionCache,
readInstalledVersion,
writeInstalledVersion,
getPinnedVersion,
savePinnedVersion,
clearPinnedVersion,
isVersionPinned,
} from './version-cache';
// Version Checker
export { isNewerVersion, fetchLatestVersion, checkForUpdates } from './version-checker';
// Extractor
export { extractTarGz, extractZip, extractArchive } from './extractor';
// Updater
export {
downloadAndInstall,
deleteBinary,
getBinaryPath,
isBinaryInstalled,
getBinaryInfo,
ensureBinary,
} from './updater';