
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
rev-web-assets
Advanced tools
Revision web asset filenames and links with a cache busting content hash fingerprint
<img src=https://centerkey.com/graphics/center-key-logo.svg align=right width=200 alt=logo>
fingerprint cache hash versioning static assets
rev-web-assets takes a web application source folder and copies its files and subfolders to a new destination. The console output includes a timestamp and formatting helpful in build systems.
<img src=https://raw.githubusercontent.com/center-key/rev-web-assets/main/screenshot.png width=800 alt=screenshot>
Install package for node:
$ npm install --save-dev rev-web-assets
Run rev-web-assets
from the "scripts"
section of your package.json file.
The first parameter is the source folder. The second parameter is the target folder.
Example package.json scripts:
"scripts": {
"make-dist": "rev-web-assets build dist",
"make-docs": "rev-web-assets src/web --ext=.html docs/api-manual"
},
Try out the first script with the command: npm run make-dist
You can install rev-web-assets globally and then run it anywhere directly from the terminal.
Example terminal commands:
$ npm install --global rev-web-assets
$ rev-web-assets src/web ext=.html docs/api-manual
Command-line flags:
Flag | Description | Value |
---|---|---|
--cd | Change working directory before starting copy. | string |
--quiet | Suppress informational messages. | N/A |
--summary | Only print out the single line summary message. | N/A |
Examples:
rev-web-assets build --basename=index dist
Only copy files with filenames matching index.*
.rev-web-assets -cd=spec fixtures mock1
Copy the folder spec/fixtures to spec/mock1.rev-web-assets build dist --summary
Displays the summary but not the individual files copied.rev-web-assets src/web --ext=.js,.html docs
Copy only the JavaScript and HTML files to the docs folder.Even though rev-web-assets is primarily intended for build scripts, the package can easily be used in ESM and TypeScript projects.
Example:
import { revWebAssets } from 'rev-web-assets';
const options = { fileExtentions: ['.html', '.js'] };
const results = revWebAssets.revision('src/web', 'docs/api-manual', options);
console.log('Number of files copied:', results.count);
See the TypeScript Declarations at the top of rev-web-assets.ts for documentation.
Build Tools
Feel free to submit questions at:
github.com/center-key/rev-web-assets/issues
FAQs
Revision web asset filenames with cache busting content hash fingerprints
The npm package rev-web-assets receives a total of 184 weekly downloads. As such, rev-web-assets popularity was classified as not popular.
We found that rev-web-assets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.