MCPcopy Create free account
hub / github.com/craftreactnative/ui / saveCacheMetadata

Function saveCacheMetadata

cli/src/utils/github-downloader.ts:75–82  ·  view source on GitHub ↗

* Saves cache metadata with timestamp

(branch: string)

Source from the content-addressed store, hash-verified

73 * Saves cache metadata with timestamp
74 */
75async 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

Callers 1

downloadFromGitHubFunction · 0.85

Calls 1

getCacheMetadataPathFunction · 0.85

Tested by

no test coverage detected