Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
This package helps with distributing binaries via npm.
First, create your compiled binaries and make them available via HTTPS.
Now create your npm installer: Make a package.json
that looks like this:
{
"name": "myApp",
"version": "1.0.0",
"description": "Install myApp",
"preferGlobal": true,
"main": "index.js",
"scripts": {
"install": "binwrap-install",
"test": "binwrap-test",
"prepublish": "npm test"
},
"license": "BSD-3-Clause",
"files": [
"index.js",
"bin"
],
"bin": {
"myapp-cli": "bin/myapp-cli"
},
"dependencies": {
"binwrap": "^1.0.0"
}
}
Then create your index.js
file like this:
var binwrap = require("binwrap");
var path = require("path");
var packageInfo = require(path.join(__dirname, "package.json"));
var version = packageInfo.version;
var root = "https://dl.bintray.com/me/myApp/" + version;
module.exports = binwrap({
binaries: [
"myapp-cli"
],
urls: {
"darwin-x64": root + "/mac-x64.tgz",
"linux-x64": root + "/linux-x64.tgz",
"win32-x64": root + "/win-i386.zip",
"win32-ia32": root + "/win-i386.zip"
}
});
Then run npm test
to verify that your packages are published correctly.
Finally, run npm publish
when you are ready to publish your installer.
FAQs
Package cross-platform binaries
We found that binwrap 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.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.