Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@rentspree/lightship
Advanced tools
A lightship module for support kubernetes liveness and readiness by @rentspree
This module is a simple wrapper of the original lightship library which helps to easily initialize the ready callback functions for multiple source of ready
interconnected services being used by the application (eg. database) or configuration loading of the application.
createReadiness
which help to split lightship signalReady
to multiple functions/health
/live
and /ready
as the original lightship does but listen on port 13000
by defaultenableLog
option to print lightship logsrandomPortOnLocal
to reserve random port behavior when the process is run on local as the original lightship does, default to false
npm install --save @rentspree/lightship
import createLightship from "@rentspree/lightship"
const { createReadiness } = createLightship()
const [ mongooseDbReady, expressReady, senecaReady ] = createReadiness(3)
// for mongoose connection
mongoose.connect(/* connectionString */)
mongoose.connection.on('connected', ()=> mongooseDbReady())
// for express
const app = express();
app.listen(3000, ()=> expressReady())
// for seneca
require('seneca')({ some_options: 123 })
.use('community-plugin-1', {some_config: SOME_CONFIG})
.use('community-plugin-2')
.listen(/* ... */)
.client(/* ... */)
.ready(()=> senecaReady())
in case of making service back to not ready state, we get functions by 2 ways ..
const [ mongooseDbReady ] = createReadiness()
// first way, return from ready function call
const mongooseNotReady = mongooseDbReady()
mongooseNotReady()
// second way, by property `toNotReady` of ready function
mongooseDbReady.toNotReady()
MIT © RentSpree
FAQs
liveness and readiness wrapper using lightship for node.js
The npm package @rentspree/lightship receives a total of 40 weekly downloads. As such, @rentspree/lightship popularity was classified as not popular.
We found that @rentspree/lightship demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.