* Save cache metadata for an MCPB source
( cacheDir: string, source: string, metadata: McpbCacheMetadata, )
| 466 | * Save cache metadata for an MCPB source |
| 467 | */ |
| 468 | async function saveCacheMetadata( |
| 469 | cacheDir: string, |
| 470 | source: string, |
| 471 | metadata: McpbCacheMetadata, |
| 472 | ): Promise<void> { |
| 473 | const metadataPath = getMetadataPath(cacheDir, source) |
| 474 | |
| 475 | await getFsImplementation().mkdir(cacheDir) |
| 476 | await writeFile(metadataPath, jsonStringify(metadata, null, 2), 'utf-8') |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * Download MCPB file from URL |
no test coverage detected