Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/bull
Advanced tools
Stub TypeScript definitions entry for bull, which provides its own types definitions
@types/bull provides TypeScript definitions for the Bull package, which is a popular library for handling distributed job queues in Node.js applications.
Creating a Queue
This feature allows you to create a new queue instance. The queue can then be used to add jobs and process them.
const Queue = require('bull');
const myQueue = new Queue('my-queue');
Adding Jobs to the Queue
This feature allows you to add jobs to the queue. Each job can contain data that will be processed by the worker.
myQueue.add({ foo: 'bar' });
Processing Jobs
This feature allows you to define a processor function that will handle the jobs added to the queue. The processor function can be asynchronous.
myQueue.process(async (job) => {
console.log(job.data);
});
Job Events
This feature allows you to listen to various job events such as 'completed', 'failed', etc. This can be useful for logging or triggering other actions based on job status.
myQueue.on('completed', (job, result) => {
console.log(`Job completed with result ${result}`);
});
Kue is another job queue library for Node.js. It provides a similar feature set to Bull, including job scheduling, job events, and job processing. However, Kue is less actively maintained compared to Bull.
Agenda is a lightweight job scheduling library for Node.js. It is designed to be simple and easy to use, with support for recurring jobs and job prioritization. Unlike Bull, Agenda is more focused on job scheduling rather than distributed job queues.
Bee-Queue is a high-performance job queue for Node.js that is designed to be simple and fast. It offers similar features to Bull, such as job processing and job events, but is optimized for high throughput and low latency.
This is a stub types definition for @types/bull (https://github.com/OptimalBits/bull#readme).
bull provides its own type definitions, so you don't need @types/bull installed!
FAQs
Stub TypeScript definitions entry for bull, which provides its own types definitions
The npm package @types/bull receives a total of 169,501 weekly downloads. As such, @types/bull popularity was classified as popular.
We found that @types/bull demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.