UNPKG

@_all_docs/cache

Version:

Fetch, cache, & map/reduce :origin/{_all_docs,:packument}` documents for a set of lexographically sorted pivots by range or partition

16 lines (11 loc) 454 B
const { join } = require('node:path'); const { listPartitionsSync } = require('../src/cache'); const { fromPivots } = require('../src/partitions'); const pivots = require(process.env.PIVOTS); const partitions = fromPivots(pivots); const cacheDir = join(__dirname, '..', 'cache'); const local = listPartitionsSync(cacheDir); const missing = partitions.filter(partition => { return !local.find(p => p.id === partition.id); }); console.dir(missing);