(cachePath: string)
| 26 | } |
| 27 | |
| 28 | function readCacheFile(cachePath: string): CacheFile | null { |
| 29 | try { |
| 30 | if (!fs.existsSync(cachePath)) return null |
| 31 | return JSON.parse(fs.readFileSync(cachePath, 'utf-8')) as CacheFile |
| 32 | } catch { |
| 33 | return null |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | function writeCacheFile(cachePath: string, content: CacheFile): void { |
| 38 | try { |
no test coverage detected