()
| 49 | export const plainTextStorage = { |
| 50 | name: 'plaintext', |
| 51 | read(): SecureStorageData | null { |
| 52 | // sync IO: called from sync context (SecureStorage interface) |
| 53 | for (const storagePath of getPlainTextStorageReadPaths()) { |
| 54 | try { |
| 55 | const data = getFsImplementation().readFileSync(storagePath, { |
| 56 | encoding: 'utf8', |
| 57 | }) |
| 58 | return jsonParse(data) |
| 59 | } catch { |
| 60 | continue |
| 61 | } |
| 62 | } |
| 63 | return null |
| 64 | }, |
| 65 | async readAsync(): Promise<SecureStorageData | null> { |
| 66 | for (const storagePath of getPlainTextStorageReadPaths()) { |
| 67 | try { |
nothing calls this directly
no test coverage detected