![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
clay-build-js
Advanced tools
Readme
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
Unknown package
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
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.