Installations
npm install respawn-group
Developer Guide
Typescript
No
Module System
N/A
Node Version
4.2.3
NPM Version
2.14.7
Score
61.8
Supply Chain
88.4
Quality
74.2
Maintenance
100
Vulnerability
99.5
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
mafintosh
Download Statistics
Total Downloads
17,166
Last Day
3
Last Week
10
Last Month
35
Last Year
448
GitHub Statistics
9 Stars
45 Commits
7 Forks
4 Watching
1 Branches
3 Contributors
Bundle Size
19.13 kB
Minified
6.54 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.0
Package Id
respawn-group@1.1.0
Size
2.61 kB
NPM Version
2.14.7
Node Version
4.2.3
Total Downloads
Cumulative downloads
Total Downloads
17,166
Last day
200%
3
Compared to previous day
Last week
100%
10
Compared to previous week
Last month
40%
35
Compared to previous month
Last year
-25.7%
448
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
respawn-group
Manage a group of respawn monitors
npm install respawn-group
Usage
1var regroup = require('respawn-group'); 2var group = regroup(); 3 4group.add('test', ['node', 'server.js']); 5group.start('test');
API
-
regroup(defaults) -> group
Instantiate a new respawn group. Allopts
will inherit fromdefaults
-
group.add(id, command, opts) -> mon
Add a new respawn monitor. See respawn for more information. If you add a new monitor with the same id as an old one it will be used when the old monitor stops. -
group.remove(id, cb)
Remove a monitor -
group.start(id) -> mon
Start a monitor -
group.stop(id, cb)
Stop a monitor -
group.restart(id) -> mon
Gracefully restart a monitor -
group.get(id) -> mon
Get a monitor -
group.has(id) -> bool
True is group has monitor -
group.list() -> array
List all monitors -
group.shutdown(cb)
Stop all services and ignore all following starts
Events
-
group.on('start', mon)
Monitor has started.mon.id
contains the id of the monitor -
group.on('stop', mon)
Monitor is fully stopped -
group.on('crash', mon)
Monitor has crashed -
group.on('restart', mon)
Monitor is being restarted -
group.on('sleep', mon)
Monitor is sleeping -
group.on('spawn', mon, process)
Monitor has spawned a child process -
group.on('exit', mon, code, signal)
Monitors child process has exited -
group.on('stdout', mon, data)
child process stdout has emitted data -
group.on('stderr', mon, data)
child process stderr has emitted data -
group.on('warn', mon, err)
Monitor has a warning -
group.on('finalize', mon)
A monitor is fully stopped and being garbage collected. Happens if you call remove or updates a monitor
Updating existing monitors
To update an existing monitor simply add it again with the same id
1group.add('test', ['node', 'server.js']); 2 3// ... wait a bit ... 4// now lets update test 5 6group.add('test', ['node', 'server2.js']); 7group.restart('test'); // you need to restart test for the new monitor to take over 8 // this will trigger a 'finalize' event for the old monitor
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 2 are checked with a SAST tool
Score
3
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More