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

nodezoo-travis

v7.1.0

Published

nodezoo.com micro-service handling travis meta data

Downloads

18

Readme

Nodezoo

nodezoo-travis

A micro-service that provides Travis data for NodeZoo. This micro-service depends on the Travis and NPM registries but also caches retrieved data to reduce load on both public registries.

If you're using this microservice, and need help, you can:

Running

This micro-service can be ran as part of a complete system or as a single isolated unit.

As a complete system

A special system repository is available that runs the complete system using Docker and Fuge.

Isolated mode

To make testing easier this micro-service can be ran in 'isolated' mode. This mode allows testing over http using a well defined port. Please note isolated mode means patterns are not exposed via mesh.

To run in isolated mode,

  • Clone this repository locally,
  • Run npm install,
  • Run npm start isolated,

Note: In memory storage is used over redis in isolated mode.

A simple http service is supported and can be called using Curl or other Rest client. The default port is 8053. It can be changed using the TRAVIS_PORT environment variable.

curl -d '{"role":"travis","cmd":"get","name":"hapi"}' http://localhost:8052/act

Configuration

Environment Variables

Various settings can be changed using environment variables, see the list below for all available variable names.

TRAVIS_HOST

  • The host to listen on in isolated mode.
  • Defaults to localhost

TRAVIS_PORT

  • The port to listen on in isolated mode.
  • Defaults to 8051 .

TRAVIS_REDIS_HOST

  • The host redis will listen on.
  • Defaults to localhost

TRAVIS_REDIS_PORT

  • The port redis listen on.
  • Defaults to 6379 .

TRAVIS_ISOLATED

  • Starts isolated mode.
  • Defaults to false.

TRAVIS_REGISTRY

  • Change the npm registry used to validate the module name.
  • Defaults to http://registry.npmjs.org/.

Sample Data

{
  "entity$": "-/-/travis_cache",
  "name": "seneca-web",
  "url": "https://travis-ci.org/senecajs/seneca-web",
  "buildId": "1398674",
  "active": "true",
  "buildState": "passed",
  "lastBuilt": "2016-02-29T17:05:48Z",
  "cached": "1460328882872",
  "id": "seneca-web"
}

Messages Handled

role:travis,cmd:get

Returns Travis specific data for the module name provided.

seneca.act(`role:travis,cmd:get`, {name:'seneca'}, (err, data) => {})

role:info,req:part

An alias for role:travis,cmd:get, allows integration into the wider nodezoo-system.

seneca.act(`role:info,req:part`, {name:'seneca'}, (err, reply) => {})

Messages Emitted

role:info,res:part

Called in response to a call to role:info,req:part.

seneca.add(`role:info,res:part`, (msg, done) => {})

Data Emitted

  • name - Name of the module
  • url - URL to the module on the Travis-CI website
  • buildId - ID
  • active - Whether the repository is active or not
  • buildState - It's most recent build state
  • lastBuilt - The time and date the module was last built at
  • cached - The time the data was last cached at

Contributing

The Nodezoo encourages open and safe participation.

If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright (c) 2016, Matthew O'Connor and other contributors. Licensed under MIT.