Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 6x 6x 6x 6x 6x 6x 4x 4x 3x 3x | import { writeFile } from 'node:fs/promises'
import { join as pathJoin } from 'node:path'
import type { ComparableVersion } from '../commons/ComparableVersion'
import { LOCAL_STORE_FILE } from '../commons/constants'
import type { OS } from '../interfaces/os.interfaces'
import type { Arch } from '../interfaces/store.interfaces'
import { loadStore } from './loadStore'
const STORE_FILE = pathJoin(__dirname, '..', LOCAL_STORE_FILE)
export async function storeNegativeHit(version: ComparableVersion, os: OS, arch: Arch): Promise<void> {
const currentStore = await loadStore()
if (!currentStore.has(os, arch, version)) {
currentStore.add(os, arch, version)
await writeFile(STORE_FILE, currentStore.toMinimalFormattedString())
}
}
|