@achingbrain/follow-registry
Follows the npm registry and yields change objects when new modules are published
Usage
const followRegistry = require('@achinbrain/follow-registry')
const options = {
ua: 'npm-registry-follower',
replicator: 'https://replicate.npmjs.com/registry/_changes',
registry: 'https://registry.npmjs.com',
concurrency: 50,
inactivityTimeout: 3600000,
inactivityBackoff: 5000,
metadataRetries: 5,
metadataRetryBackoff: 5000,
since: undefined,
seq: {
async read (),
async write (seq),
async reset ()
}
}
for await (const { packument, seq, done } of followRegistry(options)) {
console.info(`${packument.name} was updated in seq ${seq}`)
await done()
}
const seq = await follow.seq(options)
await follow.reset(options)
Changes feed
Objects returned from the feed are in the abbreviated format.
Acknowledgements
Forked from davglass/follow-registry.