π File detail
utils/secureStorage/index.ts
π§© .tsπ 18 linesπΎ 559 bytesπ text
β Back to All Filesπ― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes getSecureStorage β mainly functions, hooks, or classes. It composes internal code from fallbackStorage, macOsKeychainStorage, plainTextStorage, and types (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { createFallbackStorage } from './fallbackStorage.js' import { macOsKeychainStorage } from './macOsKeychainStorage.js' import { plainTextStorage } from './plainTextStorage.js' import type { SecureStorage } from './types.js'
π€ Exports (heuristic)
getSecureStorage
π₯οΈ Source preview
import { createFallbackStorage } from './fallbackStorage.js'
import { macOsKeychainStorage } from './macOsKeychainStorage.js'
import { plainTextStorage } from './plainTextStorage.js'
import type { SecureStorage } from './types.js'
/**
* Get the appropriate secure storage implementation for the current platform
*/
export function getSecureStorage(): SecureStorage {
if (process.platform === 'darwin') {
return createFallbackStorage(macOsKeychainStorage, plainTextStorage)
}
// TODO: add libsecret support for Linux
return plainTextStorage
}