Socket
Book a DemoInstallSign in
Socket

@heroku/release-static-artifacts

Package Overview
Dependencies
Maintainers
173
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku/release-static-artifacts

Enable static web apps to build artifacts during Heroku Release Phase and read them in web/worker/run dynos.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
173
Created
Source

release-static-artifacts

npm module developed to support static site build in release phase. Each Heroku app release (v1,v2, etc.) gets its own bundle of static artifacts, based on the version number provided by Dyno Metadata.

During download, if the current release version's artifact is not found, then it will fallback to fetching the latest artifact (by S3's Last Modified property).

  • use in release phase to upload from static-artifacts/ directory
  • use in startup script to download into static-artifacts/ directory

Install

npm

Add the package to the app:

npm install @heroku/release-static-artifacts

yarn

For a Yarn-managed app:

yarn --registry="https://registry.npmjs.org" add @heroku/release-static-artifacts

Usage

# Enable the library (currently Review Apps & Heroku CI are not supported)
export STATIC_ARTIFACTS_ENABLED=true
# Optional, force dynos to load the exact release version (do not fallback to latest)
export STATIC_ARTIFACTS_STRICT_MATCH=true
# AWS IAM credentials
export STATIC_ARTIFACTS_AWS_ACCESS_KEY_ID=xxxxx
export STATIC_ARTIFACTS_AWS_SECRET_ACCESS_KEY=yyyyy
# AWS S3 bucket name
export STATIC_ARTIFACTS_BUCKET=test-bucket
export AWS_REGION=us-east-1

# In Heroku release script
npx release-static-artifacts-upload

# In Heroku dyno startup script (.profile)
npx release-static-artifacts-download

FAQs

Package last updated on 23 Sep 2024

Did you know?

Socket

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.

Install

Related posts