
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
incremental-installer
Advanced tools
A module that helps create scripts that install non-npm dependencies for a project. Allows for smoothly and incremental adding dependencies during development
incremental-installer
A module that helps create scripts that install non-npm dependencies for a project. Allows for smoothly and incrementally adding dependencies during development.
During development, multiple engineers on a project will need to add dependencies and configuration for the project - things like database schema changes, version upgrades, and additions to the technology stack. This library helps you create scripts that can be run quickly on every pull from the repository to ensure all the correct configuration is in place. The installers created with this will be idempotent - meaning you can run them multiple times without duplicate installation happening. The installer will only install pieces that have not yet been installed.
This way, engineers can easily be sure they have the correct setup, automatically.
var install = require('incremental-installer')
var run = install.run
var Future = install.Future
install('install.state', [
function(args) { // runs first, only if the state is 0
run('yum install -y nano')
},
function(args) { // runs second, only if the state is less than 1
run('yum install -y locate')
},
{ install: function(args) { // runs third, only if the 'check' function returns true
run('yum install -y git')
},
check: function(args) { // checks to see if the install function of this object should be run
if(isGitInstalled()) {
return Future(false)
} else {
return Future(false)
}
}
}
]
).done() // ensures that any error from the returned future are thrown
npm install incremental-installer
#Usage
installFunctions
list.var install = require('incremental-installer')
install(stateFileInfo, installFunctions)
- runs install-functions that have not yet run on. Returns a future that resolves when the last function in installFunctions
finishes and resolves.
stateFilePath
- can be either:
installFunctions
- A list of tasks to run in order.
check
function will be run on every install (regardless of state), and if it returns Future(true)
the install
function will be run.
check()
- A function that returns Future(true) (see async-future) if the install
function of the object should be run.install()
- A function.
makeInstaller.run(command, printToConsole, options)
- runs a system command, displays the output on the console, and returns when the command is done. Throws an exception if the command returns an exit code other than 0
.
command
- a string of the command to runprintToConsole
- (Optional- default true) If true, output is displayed to the console. If false, its not.options
- has only one option at the moment: unref
, which causes the current process to not wait for the child process to finish before exitingmakeInstaller.Future
- a reference to async-future for convenience (e.g. to use in options.scripts[n].check
above)
I recommend using node-fibers for concurrency. This library uses async-future because requiring multiple versions of node-fibers isn't safe (causes bugs).
incremental-installer-maker is an extension of this idea that allows you to create a stand-alone script that packages any number of dependencies, and automatically installs node.js if it isn't currently installed on the machine. In the future, that related project will use incremental-installer to do what it does. But if you want something that will build a stand-alone installer, incremental-installer-maker is for you.
Anything helps:
How to submit pull requests:
npm install
at its rootReleased under the MIT license: http://opensource.org/licenses/MIT
FAQs
A module that helps create scripts that install non-npm dependencies for a project. Allows for smoothly and incremental adding dependencies during development
We found that incremental-installer 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.