New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

github2es

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github2es

--- github2es is a utility that serves as a walker to populate metadata from github for each package on npm's couch database to the corresponding ElasticSearch Documents forindexing. In order to not go over github's rate limit the module takes 10 packages

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

#github2es

github2es is a utility that serves as a walker to populate metadata from github for each package on npm's couch database to the corresponding ElasticSearch Documents forindexing. In order to not go over github's rate limit the module takes 10 packages at a time, gets the metadata from github, posts it to Elasticsearch, and waits 2000 ms until processing the next 10 packages.

#Usage

The utility is meant to be as simple as possible and contains only 1 method and 1 constructor that the user needs to invoke in order to walk.

var config = require('../../config'), 
    request = require('request'),
    github2es = require('github2es'); 

var worker = new github2es(argv.esUrl, argv.couchUrl, argv.apiKey, zKeyForRedis , numberOfSecondsForAPackageToBeReindexOn, path.join(__dirname, '/sequence.seq')); 
worker.grabPackages(function(err, res){
  
}); 

The package will throw errors for several reasons

  • a problem with a redis method throws an error

#Testing

Lab was used to test the package.

##Some notes about testing

  • Testing is done through the lab framework
  • When testing the module, the tests require the Github API key to be passed in through an enviorment variable githubApi=MY_API_KEY npm test

Keywords

github

FAQs

Package last updated on 20 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts