()
| 270 | await fs.access(EXIT_MSG_FILE_PATH); |
| 271 | const data = await fs.readFile(EXIT_MSG_FILE_PATH, "utf-8"); |
| 272 | return JSON.parse(data); |
| 273 | } catch (error) { |
| 274 | return []; |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | private async saveExitMessages(exitMsgs: ExitMessageData[]) { |
| 279 | try { |
| 280 | await fs.mkdir(path.dirname(EXIT_MSG_FILE_PATH), { recursive: true }); |
| 281 | await fs.writeFile( |
| 282 | EXIT_MSG_FILE_PATH, |
| 283 | JSON.stringify(exitMsgs, null, 2) |
no outgoing calls
no test coverage detected