source dump of claude code
at main 17 lines 559 B view raw
1import { createFallbackStorage } from './fallbackStorage.js' 2import { macOsKeychainStorage } from './macOsKeychainStorage.js' 3import { plainTextStorage } from './plainTextStorage.js' 4import type { SecureStorage } from './types.js' 5 6/** 7 * Get the appropriate secure storage implementation for the current platform 8 */ 9export function getSecureStorage(): SecureStorage { 10 if (process.platform === 'darwin') { 11 return createFallbackStorage(macOsKeychainStorage, plainTextStorage) 12 } 13 14 // TODO: add libsecret support for Linux 15 16 return plainTextStorage 17}