Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@artsy/bucket-assets
Advanced tools
Uploads a folder of static assets to an s3 bucket with convenient assumptions.
Uploads a folder of static assets to an s3 bucket with convenient features. These include:
git rev-parse HEAD
)Bucket Assets is used in deploys of Artsy apps, but may be useful for you too.
Run the CLI in your deployment process. You may omit these arguments if you use the defaults below.
bucket-assets \
--files **/public/** \
--secret s3-secret \
--key s3-key \
--bucket force-production \
--fingerprint true
Add the middleware to your app
var bucketAssets = require('bucket-assets');
app.use(bucketAssets({
// Glob that defaults to finding all files in "public" folders that
// are children of process.cwd() e.g. /public + /components/modal/public.
// Will always ignore public folders in node_modules.
files: __dirname + '/**/public/**',
// Defaults to "public". The name of the folder that is the root static
// directory so relative paths work the same locally as they do on the CDN.
root: 'public',
// Defaults to process.env.S3_KEY
key: 's3-key',
// Defaults to process.env.S3_SECRET
secret: 's3-secret',
// Defaults to process.env.S3_BUCKET
bucket: 'force-production',
// Defaults to process.env.CDN_URL
cdnUrl: '//xyz.cloudfront.net/',
// Defaults to true. Use `false` to not use fingerprinting.
fingerprint: true
}));
Use the view helper to point to the fingerprinted CDN assets in production or staging.
head
link( type='text/css', rel='stylesheet', href=asset('main.css') )
body
script( src=asset('main.js') )
Be sure to set env variables for production/staging if you're relying on the defaults
On your CI machine
S3_KEY=
S3_SECRET=
Run with deploy script
heroku config:set ASSET_MANIFEST=$(cat manifest.json)
Set once
heroku config:set CDN_URL=
Please fork the project and submit a pull request with tests. Install node modules npm install
and run tests with npm test
.
MIT
FAQs
Uploads a folder of static assets to an s3 bucket with convenient assumptions.
The npm package @artsy/bucket-assets receives a total of 7 weekly downloads. As such, @artsy/bucket-assets popularity was classified as not popular.
We found that @artsy/bucket-assets demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.