
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
node-persistent-software
Advanced tools
Spawn a software and keep it running
$ npm install node-persistent-software
maxCountRun: number max start iterationsuccessCountRun: number current success start iterationconstructor(software: string, args?: Array<string>, options?: object) => see spawn documentationmax(maxIteration: number) : this change max iterations and reset currentinfinite() : this no max iteration and reset currentstart() : this run the software for the first timeend() : this stop the software and does not restart iton("error", (err: Error) => void) : this fire if an error occurs (use try/catch to avoid loop)
on("firststart", () => void) : this fire if the software starts for the first time
on("restart", () => void) : this fire if the software restarts
on("start", (child_process: child_process.ChildProcess) => void) : this fire if the software starts (firststart && restart) => see spawn documentation
on("stop", () => void) : this fire if the software is killed
on("end", () => void) : this fire if the software is killed and cannot be restarted
const PersistantSoftware = require("node-persistent-software");
new PersistantSoftware("node", [ "-v" ]).on("error", (msg) => {
console.log(msg);
})
.infinite()
.on("firststart", () => {
console.log("node is started for the first time !");
}).on("restart", () => {
console.log("node is started again...");
}).on("start", (child_process) => {
console.log("anyway, node is started.");
})
.on("stop", () => {
console.log("node is stopped, trying to restart...");
}).on("end", () => {
console.log("/!\\ node is stopped and cannot be restarted /!\\");
}).start();
new PersistantSoftware("node", [ "-v" ]).on("error", (err) => {
console.log(err);
})
.max(5)
.on("firststart", () => {
console.log("node is started for the first time !");
}).on("restart", () => {
console.log("node is started again...");
}).on("start", () => {
console.log("anyway, node is started.");
})
.on("stop", () => {
console.log("node is stopped, trying to restart...");
}).on("end", () => {
console.log("/!\\ node is stopped and cannot be restarted /!\\");
}).start();
import PersistantSoftware = require("node-persistent-software");
new PersistantSoftware("node", [ "-v" ]).on("error", (err) => {
console.log(err);
})
.infinite();
$ npm run-script tests
FAQs
Spawn a software and keep it running
We found that node-persistent-software 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.