()
| 21 | export const plainTextStorage = { |
| 22 | name: 'plaintext', |
| 23 | read(): SecureStorageData | null { |
| 24 | // sync IO: called from sync context (SecureStorage interface) |
| 25 | const { storagePath } = getStoragePath() |
| 26 | try { |
| 27 | const data = getFsImplementation().readFileSync(storagePath, { |
| 28 | encoding: 'utf8', |
| 29 | }) |
| 30 | return jsonParse(data) |
| 31 | } catch { |
| 32 | return null |
| 33 | } |
| 34 | }, |
| 35 | async readAsync(): Promise<SecureStorageData | null> { |
| 36 | const { storagePath } = getStoragePath() |
| 37 | try { |
nothing calls this directly
no test coverage detected