Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs/bullmq

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/bullmq - npm Package Compare versions

Comparing version 1.1.0 to 10.0.0

3

dist/bull-metadata.accessor.js

@@ -28,4 +28,3 @@ "use strict";

getWorkerOptionsMetadata(target) {
var _a;
return (_a = this.reflector.get(bull_constants_1.WORKER_METADATA, target)) !== null && _a !== void 0 ? _a : {};
return this.reflector.get(bull_constants_1.WORKER_METADATA, target) ?? {};
}

@@ -32,0 +31,0 @@ getOnQueueEventMetadata(target) {

@@ -35,23 +35,19 @@ "use strict";

.getProviders()
.filter((wrapper) => {
var _a;
return this.metadataAccessor.isProcessor(
// NOTE: Regarding the ternary statement below,
// - The condition `!wrapper.metatype` is because when we use `useValue`
// the value of `wrapper.metatype` will be `null`.
// - The condition `wrapper.inject` is needed here because when we use
// `useFactory`, the value of `wrapper.metatype` will be the supplied
// factory function.
// For both cases, we should use `wrapper.instance.constructor` instead
// of `wrapper.metatype` to resolve processor's class properly.
// But since calling `wrapper.instance` could degrade overall performance
// we must defer it as much we can. But there's no other way to grab the
// right class that could be annotated with `@Processor()` decorator
// without using this property.
!wrapper.metatype || wrapper.inject
? (_a = wrapper.instance) === null || _a === void 0 ? void 0 : _a.constructor
: wrapper.metatype);
});
.filter((wrapper) => this.metadataAccessor.isProcessor(
// NOTE: Regarding the ternary statement below,
// - The condition `!wrapper.metatype` is because when we use `useValue`
// the value of `wrapper.metatype` will be `null`.
// - The condition `wrapper.inject` is needed here because when we use
// `useFactory`, the value of `wrapper.metatype` will be the supplied
// factory function.
// For both cases, we should use `wrapper.instance.constructor` instead
// of `wrapper.metatype` to resolve processor's class properly.
// But since calling `wrapper.instance` could degrade overall performance
// we must defer it as much we can. But there's no other way to grab the
// right class that could be annotated with `@Processor()` decorator
// without using this property.
!wrapper.metatype || wrapper.inject
? wrapper.instance?.constructor
: wrapper.metatype));
processors.forEach((wrapper) => {
var _a;
const { instance, metatype } = wrapper;

@@ -66,3 +62,3 @@ const isRequestScoped = !wrapper.isDependencyTreeStatic();

if (!(instance instanceof hosts_1.WorkerHost)) {
throw new errors_1.InvalidProcessorClassError((_a = instance.constructor) === null || _a === void 0 ? void 0 : _a.name);
throw new errors_1.InvalidProcessorClassError(instance.constructor?.name);
}

@@ -77,6 +73,5 @@ else {

getQueueOptions(queueToken, queueName, configKey) {
var _a;
try {
const queueRef = this.moduleRef.get(queueToken, { strict: false });
return (_a = queueRef.opts) !== null && _a !== void 0 ? _a : {};
return queueRef.opts ?? {};
}

@@ -97,6 +92,5 @@ catch (err) {

getFlowProducerOptions(flowProducerToken, name, configKey) {
var _a;
try {
const flowProducerRef = this.moduleRef.get(flowProducerToken, { strict: false });
return (_a = flowProducerRef.opts) !== null && _a !== void 0 ? _a : {};
return flowProducerRef.opts ?? {};
}

@@ -163,23 +157,19 @@ catch (err) {

.getProviders()
.filter((wrapper) => {
var _a;
return this.metadataAccessor.isQueueEventsListener(
// NOTE: Regarding the ternary statement below,
// - The condition `!wrapper.metatype` is because when we use `useValue`
// the value of `wrapper.metatype` will be `null`.
// - The condition `wrapper.inject` is needed here because when we use
// `useFactory`, the value of `wrapper.metatype` will be the supplied
// factory function.
// For both cases, we should use `wrapper.instance.constructor` instead
// of `wrapper.metatype` to resolve processor's class properly.
// But since calling `wrapper.instance` could degrade overall performance
// we must defer it as much we can. But there's no other way to grab the
// right class that could be annotated with `@Processor()` decorator
// without using this property.
!wrapper.metatype || wrapper.inject
? (_a = wrapper.instance) === null || _a === void 0 ? void 0 : _a.constructor
: wrapper.metatype);
});
.filter((wrapper) => this.metadataAccessor.isQueueEventsListener(
// NOTE: Regarding the ternary statement below,
// - The condition `!wrapper.metatype` is because when we use `useValue`
// the value of `wrapper.metatype` will be `null`.
// - The condition `wrapper.inject` is needed here because when we use
// `useFactory`, the value of `wrapper.metatype` will be the supplied
// factory function.
// For both cases, we should use `wrapper.instance.constructor` instead
// of `wrapper.metatype` to resolve processor's class properly.
// But since calling `wrapper.instance` could degrade overall performance
// we must defer it as much we can. But there's no other way to grab the
// right class that could be annotated with `@Processor()` decorator
// without using this property.
!wrapper.metatype || wrapper.inject
? wrapper.instance?.constructor
: wrapper.metatype));
eventListeners.forEach((wrapper) => {
var _a;
const { instance, metatype } = wrapper;

@@ -197,3 +187,3 @@ if (!wrapper.isDependencyTreeStatic()) {

if (!(instance instanceof hosts_1.QueueEventsHost)) {
throw new errors_1.InvalidQueueEventsListenerClassError((_a = instance.constructor) === null || _a === void 0 ? void 0 : _a.name);
throw new errors_1.InvalidQueueEventsListenerClassError(instance.constructor?.name);
}

@@ -200,0 +190,0 @@ else {

@@ -9,4 +9,3 @@ "use strict";

function createQueueAndWorkers(options, queueClass, workerClass) {
var _a;
const queueName = (_a = options.name) !== null && _a !== void 0 ? _a : 'default';
const queueName = options.name ?? 'default';
const queue = new queueClass(queueName, options);

@@ -13,0 +12,0 @@ let workerRefs = [];

@@ -12,6 +12,5 @@ "use strict";

onApplicationShutdown(signal) {
var _a;
return (_a = this._queueEvents) === null || _a === void 0 ? void 0 : _a.close();
return this._queueEvents?.close();
}
}
exports.QueueEventsHost = QueueEventsHost;

@@ -12,6 +12,5 @@ "use strict";

onApplicationShutdown(signal) {
var _a;
return (_a = this._worker) === null || _a === void 0 ? void 0 : _a.close();
return this._worker?.close();
}
}
exports.WorkerHost = WorkerHost;
{
"name": "@nestjs/bullmq",
"version": "1.1.0",
"version": "10.0.0",
"description": "Nest - modern, fast, powerful node.js web framework (@bullmq)",

@@ -22,20 +22,20 @@ "homepage": "https://github.com/nestjs/bull",

"dependencies": {
"@nestjs/bull-shared": "^0.1.3",
"tslib": "2.5.0"
"@nestjs/bull-shared": "^10.0.0",
"tslib": "2.5.3"
},
"devDependencies": {
"@nestjs/common": "9.3.7",
"@nestjs/core": "9.3.7",
"@nestjs/platform-express": "9.3.7",
"@nestjs/testing": "9.3.7",
"@types/jest": "29.4.0",
"@types/node": "18.13.0",
"@nestjs/common": "10.0.0",
"@nestjs/core": "10.0.0",
"@nestjs/platform-express": "10.0.0",
"@nestjs/testing": "10.0.0",
"@types/jest": "29.5.2",
"@types/node": "18.16.18",
"@types/reflect-metadata": "0.1.0",
"bullmq": "3.6.3",
"bullmq": "3.15.6",
"reflect-metadata": "0.1.13",
"rxjs": "7.8.0"
"rxjs": "7.8.1"
},
"peerDependencies": {
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0",
"@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.0.0",
"@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0",
"@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0",
"bullmq": "^3.0.0"

@@ -46,3 +46,3 @@ },

},
"gitHead": "d8ac7e3bd040fdc6f5983ece23b520e1e783df93"
"gitHead": "687c5af6842825e7318d842078b844ff84277312"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc