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