@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',
seqFile: '/tmp/registry-follow.seq',
concurrency: 50,
inactivityTimeout: 3600000,
inactivityBackoff: 5000,
metadataRetries: 5,
metadataRetryBackoff: 5000,
since: undefined
}
for await (const { change, done } of followRegistry(options)) {
console.info(`${change.name} was updated`)
await done()
}
Changes feed
Instead of using the "standard" feed, this pulls the feed and breaks up the data into usable bits:
{
name: .. the module name
versions: [ .. version info split into parts ..],
tarballs: [ .. all of the tarball data (shasum and url) .. ],
json: .. metadata retrieved from the registry
}
Acknowledgements
Forked from davglass/follow-registry.