
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
newsapps-deploy
Advanced tools
A collection of awscli-powered deploy scripts that can be easily reused.
A collection of awscli-powered deploy scripts that can be easily reused.
npm install --save-dev newsapps-deploy
newsapps-deploy
depends on a file to pass in configuration. By default, it looks for config.json
— but you are welcome to point it elsewhere via --config
.
Usage: newsapps-deploy [COMMAND] [--config=PATH] [--dry-run] [--gzip] [--
production]
Commands:
deploy Deploy the project to S3
push Push assets to S3
pull Pull assets from S3
Options:
-c, --config The path to the config file [default: "config.json"]
-g, --gzip Pushes code to your specified bucket with predefined HTTP
cache headers [boolean]
-p, --production Push code to the production bucket (defaults to development)
[boolean]
-d, --dry-run Print the commands instead of running them (good for
checking things out) [boolean]
-h, --help Show help [boolean]
config.json
should contain an object with a deployment
key with the following fields:
{
"deployment": {
"dev_s3_bucket": "notarealbucket.texastribune.org",
"prod_s3_bucket": "graphics.texastribune.org",
"path": "graphics",
"slug": "corgis-vs-red-pandas",
"aws_profile": "newsapps",
"dist_folder": "dist",
"assets_folder": "app/assets"
}
}
dev_s3_bucket
Push test deploys to this bucket
prod_s3_bucket
Push production deploys to this bucket
path
The path to the folder where code should be pushed.
slug
The slug of the folder (located in path
) where code should be pushed.
aws_profile
The AWS credential to use for deployment. If empty, nothing will be passed to awscli
via --profile
.
dist_folder
The folder that should be pushed up to S3. This should be your content ready for deploy.
assets_folder
The folder where raw assets are located — typically app/assets
.
The assumpion is that the .css
and .js
are being revisioned. If --gzip
is passed, the following files will be assumed to be gzipped:
.html
.css
.js
.json
.css
and .js
are set to expire in 1 year. Images — .jpg
, .png
, .svg
, and .gif
— are set to expire in 1 day. .json
files will expire in 1 hour. .html
have no set expiration.
There is a library for AWS written in node.js called aws-sdk
. However, multiple parts of our workflow already generous depend on awscli — to the point it can be assumed that it's already installed and configured.
Also — aws-sdk
has no command line interface built in. Any tasks we need to accomplish would have to be written ourselves. Why reinvent the wheel? ¯_(ツ)_/¯
FAQs
A collection of awscli-powered deploy scripts that can be easily reused.
We found that newsapps-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.