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 🙏

© 2025 – Pkg Stats / Ryan Hefner

deploy-aws-fastly

v0.1.3

Published

Deploy for Amazon S3, Fastly configuration

Readme

DeployAWSFastly (Project Tobu)

Manages the setup, deploy, and occasional rollback of versioned builds using AWS and Fastly.

Getting Started

DeployAWSFastly requires a .deployconfig.json file to be listed in the root of the project to be deployed. That file should follow the convention of the .deployconfig.bak.json example file in the root of this project.

Deploying

Deployment happens (ideally) in two steps and requires the user to have authorized deploy credentials if remote. Copy the keys file using cp /deploy/keys.json.bak /deploy/keys.json and add your authorized keys.

Once your keys are in place, you may run amazon-fastly-deploy and amazon-fastly-assign in order to deploy to production. amazon-fastly-deploy creates the build and should be pointed at the beta site. Once changes are visually reviewed and approved, they can be quickly made live by using amazon-fastly-assign. The specifics of the two commands are here:

npm run deploy

npm run deploy creates a new build and assigns the selected domain to that build. In order, the deploy command does the following:

  1. Authorizes deploy by using the remote request data in .deployconfig.json to download the configuration from a remote server. If the property remote is not included in the file, the deployconfig.json file will act as the configuration locally.
  2. Determines the destination domain by prompting the user.
  3. Determines the environment by prompting the user. Environments cannot be selected for production-only domains
  4. Resolves current git branch status. If a production domain is selected, the current branch must be clean and up-to-date.
  5. Creates the build by running executing npm run build. NOTE: Because build is run here, building before deploy is not necessary
  6. Uploads the build to S3. Distributions are labelled with the date they were uploaded. Distributions contain environment specific environment configurations and are therefore kept in s3 according to environment.
  7. Points the domain to the build and purges the cache to allow browsers to immediately receive the latest updates. This is currently a varnish configuration on Fastly. NOTE: Until this step, deploy's may be safely exited. Exiting during this step could result in complications with Fastly.

deploy options

--skip-npm-install (default false) assumes npm dependencies are already present when creating dist --require-branch (default false) ignores requirement for specific git branch on deploy --require-clean (default false) ignores requirement for git branch to be clean on deploy

npm run assign

npm run assign points a selected domain to an already-existing build. It is most often used 1) to assign a tested build to production, or 2) to rollback to a previous build in the event of emergency. In order, the assign command does the following:

  1. Determines the destination domain by prompting the user. This is the domain that will be reassigned a build.
  2. Determines the build by prompting the user. As noted, builds are listed by the date they were created by the deploy command.
  3. Points the domain to the build and purges the cache to allow browsers to immediately receive the latest updates. (Same as in step 7 of the deploy)

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details