(record: BashMonitorWakeRecord)
| 341 | } |
| 342 | |
| 343 | private async write(record: BashMonitorWakeRecord): Promise<void> { |
| 344 | const dir = this.dir(record.ownerWorkspaceId); |
| 345 | await fsPromises.mkdir(dir, { recursive: true }); |
| 346 | await fsPromises.writeFile( |
| 347 | this.file(record.ownerWorkspaceId, record.id), |
| 348 | JSON.stringify(record, null, 2), |
| 349 | "utf-8" |
| 350 | ); |
| 351 | } |
| 352 | |
| 353 | private parse(raw: string): BashMonitorWakeRecord | null { |
| 354 | let json: unknown; |
no test coverage detected