npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

npm-skim-registry

v2.2.2

Published

Move attachments into Manta and out of the registry

Downloads

16

Readme

npm-skim-registry

Mcouch for npm registries. The opposite of npm-fullfat-registry.

wercker status

This moves attachments to the target in manta, but then also deletes them out of the couchdb. It avoids then deleting them out of manta, by specifying a {skip: true} value for each tarball associated with a published version.

This results in deleting attachments that don't belong (except for favicon.ico on the npm doc, which is a special magical snowflake), but keeping attachments in Manta if they are needed for a published version, even as they are removed from couchdb.

You probably don't need this. It's super niche. More likely, if you're even reading this, you want either mcouch or npm-fullfat-registry.

USAGE

Skim({
  client:        multiFSClient,
  source:        myCouchDBUrl,
  sequenceFile:  '.sequence',
  inactivity_ms: 60*60*1000,
  delete:        true
}).on('put', function(doc) {
  console.log('PUT %s', doc._id);
}).on('rm', function(doc) {
  console.log('RM %s', doc._id);
}).on('send', function(doc, file) {
  console.log('-> sent %s/%s', doc._id, filename);
}).on('delete', function(doc, remote) {
  console.log('-> deleted %s/%s', doc._id, remote);
});

Or on the cli:

> ./bin/skim.js --help
npm-skim-registry - Skim the fat out of your registry couchdb
Usage: npm-skim-registry [args] COUCHDB

    COUCHDB                             Full url to your couch, like
                                        http://localhost:5984/database
    -f FILE, --config=FILE    config file for multifs targets; required
    -Q FILE, --seq-file=FILE  File to store the sequence in, required
    -q NUMBER, --seq=NUMBER   Sequence ID to start at; overrides sequence in file
    -r URL, --registry=URL    The registry where attachments can be found; optional
    --inactivity-ms=MS        Max ms to wait before assuming disconnection.
    -d, --delete              Delete removed attachments and docs from targets
    -s URL, --skimdb=URL      Target to write attachment-free docs. Defaults to
                              put back into COUCHDB arg.
    -h, --help                Print this help and exit