Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
clay-build-js
Advanced tools
Build JS for your Clay components.
npm install --save clay-build-js
clay build-js
const buildJs = require('clay-build-js');
buildJs({
// defaults
watch: false,
debug: false,
verbose: false
})
public/js
using browserify-splitter. These chunks can be combined arbitrarily by resolve-media within the context of a bundle.client-env.json
, which is an array of all env vars usedfalse
. Watch for changes.false
. Log all files written.false
. Disable bundle-collapser
and uglifyify
, allowing for easier debugging and faster builds.Usually, the JavaScript that any page needs is known beforehand, by the developer. For example, you might include a homepage.js
script on your homepage and a section.js
script on your section pages.
In Clay, a page is made up entirely of arbitrary data -- components. Some components need client-side JavaScript. Any page could theoretically have any combination of components.
So how do we get all the client.js that a page needs on to the page itself? The solution should:
require
should work client-side and ES6 should be transpiled to ES5.Clay-build-js resolves all these issues. It scans your Clay installation for component JS, traces their dependencies, and arranges those dependencies into a bundle via Browserify, but splits that bundle into separate chunks using browserify-splitter. It also extracts a dependency registry with browserify-extract-registry, transpiles to ES5 using Babel, and uglifies.
When Clay generates a page, it detects the components that a page contains, determines which module chunks the components need using the registry clay-build-js exported, and includes only those chunks on the page, nesting them in a context in which require
works. As a result, a Clay server can effectively generate valid bundles on-the-fly without compromising performance.
FAQs
Build JS for your Clay components.
The npm package clay-build-js receives a total of 1 weekly downloads. As such, clay-build-js popularity was classified as not popular.
We found that clay-build-js 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.