Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
binary-distributor
Advanced tools
binary-distributor is an npm package that simplifies the distribution of platform-specific binary applications via npm. It allows you to include and install pre-built binaries based on the user's system and architecture along with your JavaScript module.
Initialize minimal npm package:
npm init -y
Pay attentions fields name
and version
should be defined and same as in your binary package.
Install binary-distributor:
npm install binary-distributor --save-dev
Add postinstall
and preuninstall
scripts to your package.json
:
{
"scripts": {
"postinstall": "binary-distributor install",
"preuninstall": "binary-distributor uninstall"
}
}
Add binary-distributor
section to your package.json
:
{
"binary-distributor": {
"url-template": "url/to/your/binary.tar.gz"
}
}
Following variables are available to customize the URL template:
{name}
- Name of the package read from package.json file.{version}
- Version number read from package.json file.{platform}
- Name of the operating system (Read more).{arch}
- The operating system CPU architecture (Read more).Create launch script launch.js
with following content:
#!/usr/bin/env node
require('binary-distributor')
.launch(__dirname);
Add bin
section to your package.json
:
{
"bin": "./launch.js"
}
Then you can publish your package to npm registry:
npm publish
FAQs
Lightweight library to distribute binaries via npm
The npm package binary-distributor receives a total of 0 weekly downloads. As such, binary-distributor popularity was classified as not popular.
We found that binary-distributor demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
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.