* Save cache metadata for an MCPB source
( cacheDir: string, source: string, metadata: McpbCacheMetadata, )
| 476 | * Save cache metadata for an MCPB source |
| 477 | */ |
| 478 | async function saveCacheMetadata( |
| 479 | cacheDir: string, |
| 480 | source: string, |
| 481 | metadata: McpbCacheMetadata, |
| 482 | ): Promise<void> { |
| 483 | const metadataPath = getMetadataPath(cacheDir, source) |
| 484 | |
| 485 | await getFsImplementation().mkdir(cacheDir) |
| 486 | await writeFile(metadataPath, jsonStringify(metadata, null, 2), 'utf-8') |
| 487 | } |
| 488 | |
| 489 | /** |
| 490 | * Download MCPB file from URL |
no test coverage detected