Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
amqp-delegate
Advanced tools
A remote worker system that uses AMQP
to coordinate jobs.
amqp-simple-pub-sub
— A library that simplifies use of AMQP
based publishers and subscribers.npm install amqp-delegate
const { makeWorker } = require('amqp-delegate')
const worker = makeWorker({
url: 'ampq://localhost:5672', // the default
name: 'the name of the worker', // required
task: async () => 'any pure async function', // required
onError: err => { // optional
console.error('A connection error happened', err) // or do something clever
}
onClose: () => { // optional
console.log('The connection has closed.') // or do something clever
}
})
// start it
worker.start().then(() => {
console.log('worker', worker.name, 'started')
})
// stop it
worker.stop().then(() => {
console.log('worker', worker.name, 'stopped')
})
const { makeDelegator } = require('amqp-delegate')
const delegator = makeWorker({
url: 'ampq://localhost:5672', // the default
onError: err => { // optional
console.error('A connection error happened', err) // or something clever
}
onClose: () => { // optional
console.log('The connection has closed.') // or something clever
}
})
delegator
.start()
.then(() => {
delegator.invoke('worker name', ...params)
console.log('job name', result)
})
.catch(err => {
console.error('worker name', err)
})
const { makeWorker } = require('amqp-delegate')
const task = (a, b) => new Promise(resolve => setTimeout(() => resolve(a + b), 10))
const worker = makeWorker({
name: 'adder',
task
})
worker
.start()
.then(() => {
process.on('SIGINT', () => {
worker.stop().then(() => {
process.exit(0)
})
})
})
.catch(err => {
console.error('caught', err)
})
const { makeDelegator } = require('amqp-delegate')
const delegator = makeDelegator()
delegator
.start()
.then(() => delegator.invoke('adder', 10, 15))
.then(result => {
console.log('result', result)
})
.catch(err => {
console.error('caught', err)
})
branch | status | coverage | Audit | notes |
---|---|---|---|---|
develop | Work in progress | |||
main | Latest stable release |
nvm
to manage Node versions — brew install nvm
.)npm install
docker-compose up -d
Runs Rabbit MQ.
npm test
— runs the unit tests (does not need rabbitmq
)npm run test:unit:cov
— runs the unit tests with code coverage (does not need rabbitmq
)npm run test:integration
— runs the integration tests (needs rabbitmq
)npm run lint
Please see the contributing notes.
FAQs
A remote worker system that uses AMQP to coordinate jobs.
The npm package amqp-delegate receives a total of 6 weekly downloads. As such, amqp-delegate popularity was classified as not popular.
We found that amqp-delegate 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.