The analyzer behind https://npms.io
Clone or download

README.md

npms-analyzer

Build status Coverage status Dependency status Dev dependency status

The npms-analyzer analyzes the npm ecosystem, collecting info, evaluating and scoring each package.

Usage

This project offers all its functionality through a CLI.

Demo (output might be outdated)

Note that you must setup the project before using the CLI. The most important commands will be described below. To discover the other ones run $ npms-analyzer -h.

npms-analyzer observe

The observe command starts observing changes that occur in the npm registry as well as packages that were not analyzed for a while. Each reported package will be pushed into a queue to be processed by the queue consumers.

$ npms-analyzer observe --log-level debug | pino

For more information about the command, run $ npms-analyzer observe -h

npms-analyzer consume

The consume command starts consuming the queue, running the analysis process for each queued package.

$ npms-analyzer consume --log-level debug --concurrency 5 | pino

For more information about the command, run $ npms-analyzer consume -h

npms-analyzer scoring

The scoring command, continuously iterates over the analysis results and calculates a score for all the npm packages, storing its result in elasticsearch.

$ npms-analyzer scoring

For more information about the command, run $ npms-analyzer scoring -h

Architecture

There's a separate document that explains the architecture, you may read it here.

Setup

There's a separate document that explains the setup procedure, you may read it here.

Deploys

There's a separate document that explains the deployment procedure, you may read it here.

Tests

Before running the tests, you must have read through the setup guide.

$ npm test
$ npm test-cov # to get coverage report