Files
ccs/src/cliproxy/binary/index.ts
T
kaitranntt 628148c359 fix(cliproxy): make backend switching work with version pins and status
- Add backend param to isCLIProxyInstalled(), getCLIProxyPath(),
  getInstalledCliproxyVersion(), installCliproxyVersion()
- Update getBinaryStatus() to pass backend to all helper functions
- Add getBackendLabel() helper for dynamic CLI messages
- Replace hardcoded "CLIProxy Plus" strings with dynamic labels
- Pass --backend flag through install/update command handlers
- Import CLIProxyBackend type from types.ts instead of redefining

Setting `cliproxy.backend: original` in config.yaml now correctly
uses the original backend for version pins and binary operations.
2026-01-23 10:52:01 -05:00

46 lines
1.1 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,
migrateVersionPin,
} 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';