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

jackie

v0.0.3

Published

deployment app for ebs

Downloads

4

Readme

jackie

Jackie puts things in the [Elastic|Magic] Beanstalk.

The use case for Jackie is providing a way to define EB applications and environments at build time that can blue-green deploy new Application Versions deployed to an AWS instance.

Install

npm install jackie --save

Usage

API

var Jackie = require("jackie");

var jackie = new Jackie({
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,
  secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
});

// Setup
jackie.addApplication(fs.readFileSync(__dirname + "/examples/example.json, "utf-8").toString()).then(function () {
  console.log("Application added");
});

// ...

// Add a new version
jackie.getApplication

Jackie

The Jackie object interacts with Elastic Beanstalk applications and deployments, and is the main entry point for the application.

new Jackie(config)

Creates a new Jackie instance. Pass in config the same as the aws-sdk's AWS.ElasticBeanstalk constructor.

(Promise->Application) jackie.addApplication(definition)

Registers a new application definition with environment settings. An example definition manifest can be found in ./examples/example.json. Creates a new Application and initializes it, creating the application on AWS if it doesn't yet exist. Returns a Promise that resolves to an Application.

An example definition manifest can be found in ./examples/example.json. All of AWS's Command Options can be defined in the object as well.

(Application|null) jackie.getApplication(appName)

Returns the Application instance by name, as defined in the Application's definition.

(Promise) jackie.removeApplication(appName)

Removes application from AWS and from Jackie's internal store.

Application

(Promise->ApplicationVersionDescription) application.addVersion(params)

Adds a new version of the application's artifact via S3 link. Parameters:

  • version - string of the version label of this version.
  • description - string description of this build.
  • bucket - S3 bucket name where the artifact lives.
  • key - S3 key on the bucket where the aritfact can be found.

(Promise->Environment) application.createEnvironment(envManifest)

Creates a new environment on AWS, and returns a new Environment object and tracks it internally. An example environment manifest can be found in ./examples/example.json, the objects in the environments array.

(Promise->[EnvironmentDescription]) application.getEnvironments()

Returns a promise that returns an array of EnvironmentDescription related to this application from AWS.

(Promise->EnvironmentDescription|null) application.getEnvironment(envName)

Returns a promise that returns an EnvironmentDescription for the environment with envName that is associated with the current application.

(Promise->Environment|null) application.deploy(envName, version)

Deploys application version on environment named envName.

(Promise) application.remove()

Removes application from AWS. Should not be called directly, but via the Jackie instance.

(Promise->Environment) environment.deploy(version);

Deploys version of the application on this environment. Creates the environment if

Tests

WARNING Running non-mock integration tests, with real AWS credentials, will wipe all of your EB applications and instances. Use with a separate account or region.

Run tests via:

  • npm run unit - runs unit tests.
  • npm run integration - runs integration tests, pinging AWS. Requires environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY defined with AWS credentials with access to elastic beanstalk and S3.
  • npm run integration-mock - runs integration tests with mocks. Does not require AWS credentials.
  • npm test - runs both unit and (non-mocked) integration tests.

License

Copyright 2014 Jordan Santell, MIT License