diff --git a/src/cliproxy/binary/platform-detector.ts b/src/cliproxy/binary/platform-detector.ts index 9c1d2f9f..1692a356 100644 --- a/src/cliproxy/binary/platform-detector.ts +++ b/src/cliproxy/binary/platform-detector.ts @@ -2,7 +2,7 @@ * Platform Detector for CLIProxyAPI Binary Downloads * * Detects OS and architecture to determine correct binary asset. - * Supports 6 platforms: darwin/linux/windows x amd64/arm64 + * Supports 6 platforms: darwin/linux/windows x amd64/aarch64 */ import { @@ -75,7 +75,7 @@ const OS_MAP: Record = { const ARCH_MAP: Record = { x64: 'amd64', - arm64: 'arm64', + arm64: 'aarch64', }; /** @@ -103,7 +103,7 @@ export function detectPlatform( if (!arch) { throw new Error( - `Unsupported CPU architecture: ${nodeArch}\n` + `Supported: x64 (amd64), arm64` + `Unsupported CPU architecture: ${nodeArch}\n` + `Supported: x64 (amd64), arm64 (aarch64)` ); } @@ -195,7 +195,7 @@ export function isPlatformSupported(): boolean { /** * Get human-readable platform description - * @returns Description string (e.g., "macOS arm64") + * @returns Description string (e.g., "macOS aarch64") */ export function getPlatformDescription(): string { try { diff --git a/src/cliproxy/types/__tests__/types-backward-compat.test.ts b/src/cliproxy/types/__tests__/types-backward-compat.test.ts index 5ee676ad..9d38736b 100644 --- a/src/cliproxy/types/__tests__/types-backward-compat.test.ts +++ b/src/cliproxy/types/__tests__/types-backward-compat.test.ts @@ -34,7 +34,7 @@ import { PLUS_ONLY_PROVIDERS } from '../../types'; describe('types.ts backward compatibility', () => { it('exports all platform types', () => { const os: SupportedOS = 'darwin'; - const arch: SupportedArch = 'arm64'; + const arch: SupportedArch = 'aarch64'; const ext: ArchiveExtension = 'tar.gz'; const info: PlatformInfo = { os, @@ -43,7 +43,7 @@ describe('types.ts backward compatibility', () => { extension: ext, }; expect(info.os).toBe('darwin'); - expect(info.arch).toBe('arm64'); + expect(info.arch).toBe('aarch64'); }); it('exports all binary types', () => { diff --git a/src/cliproxy/types/platform-types.ts b/src/cliproxy/types/platform-types.ts index 0fdd0f65..e05646c7 100644 --- a/src/cliproxy/types/platform-types.ts +++ b/src/cliproxy/types/platform-types.ts @@ -6,7 +6,7 @@ export type SupportedOS = 'darwin' | 'linux' | 'windows'; /** Supported CPU architectures */ -export type SupportedArch = 'amd64' | 'arm64'; +export type SupportedArch = 'amd64' | 'aarch64'; /** Archive extension based on platform */ export type ArchiveExtension = 'tar.gz' | 'zip';