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

donejs-travis-encrypt

v3.0.0

Published

Encrypts data for use in your travis-ci yml configuration file

Downloads

43

Readme

travis-encrypt

Encrypt environment variables for use in your travis-ci .travis.yml configuration files. Now supports Travis-ci Pro!

Installation

On Debian/Ubuntu, you should install nodejs-legacy not nodejs (see Stackoverflow for more details). Then install via your preferred method, for example npm:

% sudo apt-get install nodejs-legacy npm
% npm install pwmckenna/node-travis-encrypt

CLI

Usage: travis-encrypt -r [repository slug] -u [username] -p [password] -a

Options:
  -r, --repo        repository slug                                                   [string]
  -u, --username    github username associated with the pro travis repo               [string]
  -p, --password    github password for the user associated with the pro travis repo  [string]
  -a, --add         add it to .travis.yml under the given key or `env.global`         [string]
args
travis-encrypt -r pwmckenna/node-travis-encrypt ENV1=VALUE1
> # ENV1
> fsqKj4hKmeB8T28xIkrYZqwM6i9CMvOnUUGXcxgvcroBQyNn/0lNX68UTcjyOmW8oE4yOyHJ+rWLp6qEG \
> Rjxi+LG/lIqx27bAwIJbEnOZfxBuGCkJrlymsEKz7efE8b2nwgBXzeVNNhu4eg76IwMcgXL5QxrsYhwRMyXGcsOcBA=
stdin
echo ENV1=VALUE1 ENV2=VALUE2 | ./bin/travis-encrypt-cli.js -r pwmckenna/node-travis-encrypt
> # ENV1
> dSVtmeY8PRGTwze0dQJs/PazSbWUtF81w374t9CHWP9/JafgLjxgp6WHQR+RF+3VW74LlgOvD4q1XN2KT+nsN0 \
> wfeDNlBfD+Ekp1Ohh/Hjgu0957tq8907+KPIjAwJ9xnbd1y37wnjHyMUxLBcMrjzc+m1Vbx5E2gNEeMvApN28=
> # ENV2
> eA9USvpYLcLYzmWkrBqNm7baojEp+TfpsYTzHoGXDTlqsX0K7yKRsGtm7bHPOBSBRI6y71iT752NQn93broqwN \
> 9THCR/ZEYGGA1JgoNrsKYlDFp9G00tTobIoFygDUy940W5X0fySJU87dxLTaGxcbfMkKFAPamnpSEQI2Jkyso=
using --username & --password for Travis-ci Pro
travis-encrypt -r pwmckenna/private-repo -u pwmckenna -p password EXAMPLE_ENV_VARIABLE
> # EXAMPLE_ENV_VARIABLE
> fsqKj4hKmeB8T28xIkrYZqwM6i9CMvOnUUGXcxgvcroBQyNn/0lNX68UTcjyOmW8oE4yOyHJ+rWLp6qEG \
> Rjxi+LG/lIqx27bAwIJbEnOZfxBuGCkJrlymsEKz7efE8b2nwgBXzeVNNhu4eg76IwMcgXL5QxrsYhwRMyXGcsOcBA=

Take the output and add it as secure environment variables in your .travis.yml file.

language: node_js
node_js:
    - 0.8
env:
    global:
        - secure: "XqJtWxYjtjhRO3LzC/iBGLawDP+f/dL6kcUfDzDJPSKhdnXIRQgBE65g58hf1bPh4YowxuyPUnpK5pq6+frYQ6zNsW0AWBMa2dUP1FdSIxdCJNa3UHlMLYhqqECuVvev9A9NCijKBkuOOA+OvNgq9NIQsiS4g+dsaAlpuE72MYc="
using --add to populate .travis.yml
travis-encrypt --add -r pwmckenna/node-travis-encrypt ENV1=VALUE1 ENV2=VALUE2
> Wrote 2 blob(s) to .travis.yml
using --add to populate .travis.yml with Heroku deploy key
travis-encrypt --add deploy.api_key -r pwmckenna/node-travis-encrypt "<Heroku API key>"
> Wrote 1 blob(s) to .travis.yml

Module

var encrypt = require('travis-encrypt');
encrypt({
  repo: 'pwmckenna/node-travis-encrypt',
  data: 'EXAMPLE_ENV_VARIABLE=asdf'
}, function (err, blob) {
  // do something with the encrypted data blob...
});

// also supports encrypting for private travis pro repos,
// though it needs your github credentials to login to travis pro.
encrypt({
  repo: 'pwmckenna/private-repo',
  data: 'EXAMPLE_ENV_VARIABLE=asdf',
  username: 'username',
  password: 'password'
}, function (err, blob) {
  // do something with the encrypted data blob...
});