/
aqa
/
claude-code
Обзор
Документация
Войти
/
aqa
/
claude-code
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
utils/authPortable.ts
19 строк
674 B
kuberwastaken
new initial commit (history rewritten)
01 апр 2026, 14:57
01 апр 2026, 14:57
c1996f2
Код
Авторство
О чём код?
import { execa } from 'execa' import { getMacOsKeychainStorageServiceName } from 'src/utils/secureStorage/macOsKeychainHelpers.js' export async function maybeRemoveApiKeyFromMacOSKeychainThrows(): Promise<void> { if (process.platform === 'darwin') { const storageServiceName = getMacOsKeychainStorageServiceName() const result = await execa( `security delete-generic-password -a $USER -s "${storageServiceName}"`, { shell: true, reject: false }, ) if (result.exitCode !== 0) { throw new Error('Failed to delete keychain entry') } } } export function normalizeApiKeyForConfig(apiKey: string): string { return apiKey.slice(-20) }