GithubHelp home page GithubHelp logo

isabella232 / npm-skim-registry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from npm/npm-skim-registry

0.0 0.0 0.0 1.18 MB

Move attachments into Manta and out of the registry

License: ISC License

JavaScript 100.00%

npm-skim-registry's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.