* Saves cache metadata with timestamp
(branch: string)
| 73 | * Saves cache metadata with timestamp |
| 74 | */ |
| 75 | async function saveCacheMetadata(branch: string): Promise<void> { |
| 76 | const metadataPath = getCacheMetadataPath(branch); |
| 77 | const metadata: CacheMetadata = { |
| 78 | timestamp: Date.now(), |
| 79 | branch, |
| 80 | }; |
| 81 | await fs.writeJson(metadataPath, metadata, { spaces: 2 }); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Downloads a file from URL with redirect support |
no test coverage detected