@nest-boot/bullmq 7.3.7 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bullmq-module-options.interface.d.ts +0 -2
- package/dist/bullmq-module-options.interface.js +1 -2
- package/dist/bullmq.module-definition.d.ts +1 -1
- package/dist/bullmq.module-definition.js +7 -11
- package/dist/bullmq.module-definition.js.map +1 -1
- package/dist/bullmq.module.d.ts +1 -28
- package/dist/bullmq.module.js +17 -47
- package/dist/bullmq.module.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -25
- package/dist/index.js.map +1 -1
- package/dist/processor.decorator.d.ts +5 -28
- package/dist/processor.decorator.js +7 -11
- package/dist/processor.decorator.js.map +1 -1
- package/dist/utils/load-config-from-env.util.js +1 -4
- package/dist/utils/load-config-from-env.util.js.map +1 -1
- package/package.json +35 -27
- package/dist/bullmq.module.spec.d.ts +0 -1
- package/dist/bullmq.module.spec.js +0 -117
- package/dist/bullmq.module.spec.js.map +0 -1
- package/dist/index.spec.d.ts +0 -1
- package/dist/index.spec.js +0 -47
- package/dist/index.spec.js.map +0 -1
- package/dist/processor.decorator.spec.d.ts +0 -1
- package/dist/processor.decorator.spec.js +0 -71
- package/dist/processor.decorator.spec.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/load-config-from-env.util.spec.d.ts +0 -1
- package/dist/utils/load-config-from-env.util.spec.js +0 -46
- package/dist/utils/load-config-from-env.util.spec.js.map +0 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ConnectionOptions, type QueueOptions } from "bullmq";
|
|
2
|
-
/** Configuration options for the BullMQ module. */
|
|
3
2
|
export interface BullModuleOptions extends Omit<QueueOptions, "connection"> {
|
|
4
|
-
/** Redis connection options for BullMQ queues and workers. */
|
|
5
3
|
connection?: ConnectionOptions;
|
|
6
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BullModuleOptions } from "./bullmq-module-options.interface";
|
|
1
|
+
import { BullModuleOptions } from "./bullmq-module-options.interface.js";
|
|
2
2
|
export declare const SCHEDULE_QUEUE_NAME = "schedule";
|
|
3
3
|
export declare const SCHEDULE_METADATA_KEY: `${string}-${string}-${string}-${string}-${string}`;
|
|
4
4
|
export declare const MODULE_OPTIONS_TOKEN: unique symbol;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
exports.SCHEDULE_QUEUE_NAME = "schedule";
|
|
8
|
-
exports.SCHEDULE_METADATA_KEY = (0, crypto_1.randomUUID)();
|
|
9
|
-
exports.MODULE_OPTIONS_TOKEN = Symbol("BullModuleOptions");
|
|
10
|
-
_a = new common_1.ConfigurableModuleBuilder()
|
|
1
|
+
import { ConfigurableModuleBuilder } from "@nestjs/common";
|
|
2
|
+
import { randomUUID } from "crypto";
|
|
3
|
+
export const SCHEDULE_QUEUE_NAME = "schedule";
|
|
4
|
+
export const SCHEDULE_METADATA_KEY = randomUUID();
|
|
5
|
+
export const MODULE_OPTIONS_TOKEN = Symbol("BullModuleOptions");
|
|
6
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN: BASE_MODULE_OPTIONS_TOKEN, OPTIONS_TYPE, ASYNC_OPTIONS_TYPE, } = new ConfigurableModuleBuilder()
|
|
11
7
|
.setClassMethodName("forRoot")
|
|
12
|
-
.build()
|
|
8
|
+
.build();
|
|
13
9
|
//# sourceMappingURL=bullmq.module-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq.module-definition.js","sourceRoot":"","sources":["../src/bullmq.module-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullmq.module-definition.js","sourceRoot":"","sources":["../src/bullmq.module-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAE9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,EAAE,CAAC;AAElD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAEhE,MAAM,CAAC,MAAM,EACX,uBAAuB,EACvB,oBAAoB,EAAE,yBAAyB,EAC/C,YAAY,EACZ,kBAAkB,GACnB,GAAG,IAAI,yBAAyB,EAAqB;KACnD,kBAAkB,CAAC,SAAS,CAAC;KAC7B,KAAK,EAAE,CAAC"}
|
package/dist/bullmq.module.d.ts
CHANGED
|
@@ -1,36 +1,9 @@
|
|
|
1
1
|
import { BullModule as BaseBullModule } from "@nestjs/bullmq";
|
|
2
2
|
import { type DynamicModule } from "@nestjs/common";
|
|
3
|
-
import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./bullmq.module-definition";
|
|
4
|
-
/**
|
|
5
|
-
* BullMQ integration module for job queue processing.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Wraps `@nestjs/bullmq` with automatic Redis connection configuration
|
|
9
|
-
* from `REDIS_URL`. Supports registering queues and flow producers.
|
|
10
|
-
*/
|
|
3
|
+
import { ASYNC_OPTIONS_TYPE, ConfigurableModuleClass, OPTIONS_TYPE } from "./bullmq.module-definition.js";
|
|
11
4
|
export declare class BullModule extends ConfigurableModuleClass {
|
|
12
|
-
/**
|
|
13
|
-
* Registers the BullModule with the given options.
|
|
14
|
-
* @param options - Configuration options including Redis connection
|
|
15
|
-
* @returns Dynamic module configuration
|
|
16
|
-
*/
|
|
17
5
|
static forRoot(options: typeof OPTIONS_TYPE): DynamicModule;
|
|
18
|
-
/**
|
|
19
|
-
* Registers the BullModule asynchronously with factory functions.
|
|
20
|
-
* @param options - Async configuration options
|
|
21
|
-
* @returns Dynamic module configuration
|
|
22
|
-
*/
|
|
23
6
|
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule;
|
|
24
|
-
/**
|
|
25
|
-
* Registers a BullMQ queue.
|
|
26
|
-
* @param args - registerQueue arguments
|
|
27
|
-
* @returns Dynamic module configuration
|
|
28
|
-
*/
|
|
29
7
|
static registerQueue(...args: Parameters<typeof BaseBullModule.registerQueue>): DynamicModule;
|
|
30
|
-
/**
|
|
31
|
-
* Registers a BullMQ queue asynchronously.
|
|
32
|
-
* @param args - registerQueueAsync arguments
|
|
33
|
-
* @returns Dynamic module configuration
|
|
34
|
-
*/
|
|
35
8
|
static registerQueueAsync(...args: Parameters<typeof BaseBullModule.registerQueueAsync>): DynamicModule;
|
|
36
9
|
}
|
package/dist/bullmq.module.js
CHANGED
|
@@ -1,80 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const load_config_from_env_util_1 = require("./utils/load-config-from-env.util");
|
|
14
|
-
/**
|
|
15
|
-
* BullMQ integration module for job queue processing.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Wraps `@nestjs/bullmq` with automatic Redis connection configuration
|
|
19
|
-
* from `REDIS_URL`. Supports registering queues and flow producers.
|
|
20
|
-
*/
|
|
21
|
-
let BullModule = class BullModule extends bullmq_module_definition_1.ConfigurableModuleClass {
|
|
22
|
-
/**
|
|
23
|
-
* Registers the BullModule with the given options.
|
|
24
|
-
* @param options - Configuration options including Redis connection
|
|
25
|
-
* @returns Dynamic module configuration
|
|
26
|
-
*/
|
|
7
|
+
import { BullModule as BaseBullModule } from "@nestjs/bullmq";
|
|
8
|
+
import { Global, Module } from "@nestjs/common";
|
|
9
|
+
import { BASE_MODULE_OPTIONS_TOKEN, ConfigurableModuleClass, MODULE_OPTIONS_TOKEN, } from "./bullmq.module-definition.js";
|
|
10
|
+
import { loadConfigFromEnv } from "./utils/load-config-from-env.util.js";
|
|
11
|
+
let BullModule = class BullModule extends ConfigurableModuleClass {
|
|
27
12
|
static forRoot(options) {
|
|
28
13
|
return super.forRoot(options);
|
|
29
14
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Registers the BullModule asynchronously with factory functions.
|
|
32
|
-
* @param options - Async configuration options
|
|
33
|
-
* @returns Dynamic module configuration
|
|
34
|
-
*/
|
|
35
15
|
static forRootAsync(options) {
|
|
36
16
|
return super.forRootAsync(options);
|
|
37
17
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Registers a BullMQ queue.
|
|
40
|
-
* @param args - registerQueue arguments
|
|
41
|
-
* @returns Dynamic module configuration
|
|
42
|
-
*/
|
|
43
18
|
static registerQueue(...args) {
|
|
44
|
-
return
|
|
19
|
+
return BaseBullModule.registerQueue(...args);
|
|
45
20
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Registers a BullMQ queue asynchronously.
|
|
48
|
-
* @param args - registerQueueAsync arguments
|
|
49
|
-
* @returns Dynamic module configuration
|
|
50
|
-
*/
|
|
51
21
|
static registerQueueAsync(...args) {
|
|
52
|
-
return
|
|
22
|
+
return BaseBullModule.registerQueueAsync(...args);
|
|
53
23
|
}
|
|
54
24
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
(0, common_1.Module)({
|
|
25
|
+
BullModule = __decorate([
|
|
26
|
+
Global(),
|
|
27
|
+
Module({
|
|
59
28
|
imports: [
|
|
60
|
-
|
|
61
|
-
inject: [
|
|
29
|
+
BaseBullModule.forRootAsync({
|
|
30
|
+
inject: [MODULE_OPTIONS_TOKEN],
|
|
62
31
|
useFactory: (options) => {
|
|
63
32
|
return {
|
|
64
33
|
...options,
|
|
65
|
-
connection: options.connection ??
|
|
34
|
+
connection: options.connection ?? loadConfigFromEnv(),
|
|
66
35
|
};
|
|
67
36
|
},
|
|
68
37
|
}),
|
|
69
38
|
],
|
|
70
39
|
providers: [
|
|
71
40
|
{
|
|
72
|
-
provide:
|
|
73
|
-
inject: [{ token:
|
|
41
|
+
provide: MODULE_OPTIONS_TOKEN,
|
|
42
|
+
inject: [{ token: BASE_MODULE_OPTIONS_TOKEN, optional: true }],
|
|
74
43
|
useFactory: (options) => options ?? {},
|
|
75
44
|
},
|
|
76
45
|
],
|
|
77
|
-
exports: [
|
|
46
|
+
exports: [MODULE_OPTIONS_TOKEN],
|
|
78
47
|
})
|
|
79
48
|
], BullModule);
|
|
49
|
+
export { BullModule };
|
|
80
50
|
//# sourceMappingURL=bullmq.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq.module.js","sourceRoot":"","sources":["../src/bullmq.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullmq.module.js","sourceRoot":"","sources":["../src/bullmq.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAsB,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAEL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AA+BlE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,uBAAuB;IAMrD,MAAM,CAAU,OAAO,CAAC,OAA4B;QAClD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAOD,MAAM,CAAU,YAAY,CAC1B,OAAkC;QAElC,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAOD,MAAM,CAAC,aAAa,CAClB,GAAG,IAAqD;QAExD,OAAO,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC;IAOD,MAAM,CAAC,kBAAkB,CACvB,GAAG,IAA0D;QAE7D,OAAO,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,CAAC;IACpD,CAAC;CACF,CAAA;AA1CY,UAAU;IAtBtB,MAAM,EAAE;IACR,MAAM,CAAC;QACN,OAAO,EAAE;YACP,cAAc,CAAC,YAAY,CAAC;gBAC1B,MAAM,EAAE,CAAC,oBAAoB,CAAC;gBAC9B,UAAU,EAAE,CAAC,OAA0B,EAAE,EAAE;oBACzC,OAAO;wBACL,GAAG,OAAO;wBACV,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,iBAAiB,EAAE;qBACtD,CAAC;gBACJ,CAAC;aACF,CAAC;SACH;QACD,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,oBAAoB;gBAC7B,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;gBAC9D,UAAU,EAAE,CAAC,OAA2B,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE;aAC3D;SACF;QACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAChC,CAAC;GACW,UAAU,CA0CtB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BullModule } from "./bullmq.module";
|
|
2
|
-
export * from "./bullmq-module-options.interface";
|
|
3
|
-
export { Processor } from "./processor.decorator";
|
|
1
|
+
export { BullModule } from "./bullmq.module.js";
|
|
2
|
+
export * from "./bullmq-module-options.interface.js";
|
|
3
|
+
export { type NestWorkerOptions, Processor } from "./processor.decorator.js";
|
|
4
4
|
export * from "@nestjs/bullmq";
|
|
5
5
|
export { QueueEventsListener } from "@nestjs/bullmq";
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.QueueEventsListener = exports.Processor = exports.BullModule = void 0;
|
|
18
|
-
var bullmq_module_1 = require("./bullmq.module");
|
|
19
|
-
Object.defineProperty(exports, "BullModule", { enumerable: true, get: function () { return bullmq_module_1.BullModule; } });
|
|
20
|
-
__exportStar(require("./bullmq-module-options.interface"), exports);
|
|
21
|
-
var processor_decorator_1 = require("./processor.decorator");
|
|
22
|
-
Object.defineProperty(exports, "Processor", { enumerable: true, get: function () { return processor_decorator_1.Processor; } });
|
|
23
|
-
__exportStar(require("@nestjs/bullmq"), exports);
|
|
24
|
-
var bullmq_1 = require("@nestjs/bullmq");
|
|
25
|
-
Object.defineProperty(exports, "QueueEventsListener", { enumerable: true, get: function () { return bullmq_1.QueueEventsListener; } });
|
|
1
|
+
export { BullModule } from "./bullmq.module.js";
|
|
2
|
+
export * from "./bullmq-module-options.interface.js";
|
|
3
|
+
export { Processor } from "./processor.decorator.js";
|
|
4
|
+
export * from "@nestjs/bullmq";
|
|
5
|
+
export { QueueEventsListener } from "@nestjs/bullmq";
|
|
26
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,OAAO,EAA0B,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC7E,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
|
-
import { ProcessorOptions } from "@nestjs/bullmq";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* @remarks
|
|
7
|
-
* Wraps the `@nestjs/bullmq` `Processor` decorator to automatically
|
|
8
|
-
* create a {@link RequestContext} for each processed job.
|
|
9
|
-
*
|
|
10
|
-
* @param queueName - The name of the queue to process
|
|
11
|
-
*/
|
|
1
|
+
import { type ProcessorOptions } from "@nestjs/bullmq";
|
|
2
|
+
import type { WorkerOptions } from "bullmq";
|
|
3
|
+
export type NestWorkerOptions = Omit<WorkerOptions, "connection"> & Partial<Pick<WorkerOptions, "connection">> & {
|
|
4
|
+
sharedConnection?: boolean;
|
|
5
|
+
};
|
|
12
6
|
export declare function Processor(queueName: string): ClassDecorator;
|
|
13
|
-
/**
|
|
14
|
-
* Decorator that marks a class as a BullMQ queue processor with worker options.
|
|
15
|
-
*
|
|
16
|
-
* @param queueName - The name of the queue to process
|
|
17
|
-
* @param workerOptions - Worker configuration options
|
|
18
|
-
*/
|
|
19
7
|
export declare function Processor(queueName: string, workerOptions: NestWorkerOptions): ClassDecorator;
|
|
20
|
-
/**
|
|
21
|
-
* Decorator that marks a class as a BullMQ queue processor with processor options.
|
|
22
|
-
*
|
|
23
|
-
* @param processorOptions - Processor configuration options
|
|
24
|
-
*/
|
|
25
8
|
export declare function Processor(processorOptions: ProcessorOptions): ClassDecorator;
|
|
26
|
-
/**
|
|
27
|
-
* Decorator that marks a class as a BullMQ queue processor with processor and worker options.
|
|
28
|
-
*
|
|
29
|
-
* @param processorOptions - Processor configuration options
|
|
30
|
-
* @param workerOptions - Worker configuration options
|
|
31
|
-
*/
|
|
32
9
|
export declare function Processor(processorOptions: ProcessorOptions, workerOptions: NestWorkerOptions): ClassDecorator;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.Processor = Processor;
|
|
5
|
-
const request_context_1 = require("@nest-boot/request-context");
|
|
6
|
-
const bullmq_1 = require("@nestjs/bullmq");
|
|
7
|
-
function Processor(queueNameOrOptions, maybeWorkerOptions) {
|
|
1
|
+
import { RequestContext } from "@nest-boot/request-context";
|
|
2
|
+
import { JOB_REF, Processor as BaseProcessor, } from "@nestjs/bullmq";
|
|
3
|
+
export function Processor(queueNameOrOptions, maybeWorkerOptions) {
|
|
8
4
|
return (target) => {
|
|
9
5
|
const originalProcess = target.prototype.process;
|
|
10
6
|
if (originalProcess) {
|
|
11
7
|
target.prototype.process = async function (...args) {
|
|
12
8
|
const [job] = args;
|
|
13
|
-
const ctx = new
|
|
9
|
+
const ctx = new RequestContext({
|
|
14
10
|
id: job.id,
|
|
15
11
|
type: "queue",
|
|
16
12
|
});
|
|
17
|
-
ctx.set(
|
|
18
|
-
return await
|
|
13
|
+
ctx.set(JOB_REF, job);
|
|
14
|
+
return await RequestContext.run(ctx, () => originalProcess.apply(this, args));
|
|
19
15
|
};
|
|
20
16
|
}
|
|
21
|
-
(
|
|
17
|
+
BaseProcessor(queueNameOrOptions, maybeWorkerOptions)(target);
|
|
22
18
|
};
|
|
23
19
|
}
|
|
24
20
|
//# sourceMappingURL=processor.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor.decorator.js","sourceRoot":"","sources":["../src/processor.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"processor.decorator.js","sourceRoot":"","sources":["../src/processor.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,OAAO,EACP,SAAS,IAAI,aAAa,GAG3B,MAAM,gBAAgB,CAAC;AAuDxB,MAAM,UAAU,SAAS,CACvB,kBAA8C,EAC9C,kBAAsC;IAEtC,OAAO,CAAC,MAA2B,EAAE,EAAE;QACrC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,OAA0B,CAAC;QACpE,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,WAC9B,GAAG,IAAiC;gBAEpC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACnB,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC;oBAC7B,EAAE,EAAE,GAAG,CAAC,EAAE;oBACV,IAAI,EAAE,OAAO;iBACd,CAAC,CAAC;gBAEH,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;gBAEtB,OAAO,MAAM,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CACxC,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAClC,CAAC;YACJ,CAAC,CAAC;QACJ,CAAC;QAED,aAAa,CAAC,kBAAyB,EAAE,kBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9E,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadConfigFromEnv = loadConfigFromEnv;
|
|
4
1
|
function normalizeHostname(hostname) {
|
|
5
2
|
if (hostname.startsWith("[") && hostname.endsWith("]")) {
|
|
6
3
|
return hostname.slice(1, -1);
|
|
7
4
|
}
|
|
8
5
|
return hostname;
|
|
9
6
|
}
|
|
10
|
-
function loadConfigFromEnv() {
|
|
7
|
+
export function loadConfigFromEnv() {
|
|
11
8
|
if (process.env.REDIS_URL) {
|
|
12
9
|
const url = new URL(process.env.REDIS_URL);
|
|
13
10
|
const port = url.port;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-config-from-env.util.js","sourceRoot":"","sources":["../../src/utils/load-config-from-env.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load-config-from-env.util.js","sourceRoot":"","sources":["../../src/utils/load-config-from-env.util.ts"],"names":[],"mappings":"AAEA,SAAS,iBAAiB,CAAC,QAAgB;IACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5C,OAAO;YACL,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC;YACrC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC9B,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACpC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC1C,QAAQ,EAAE,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC1C,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnD,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/bullmq",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/nest-boot/nest-boot.git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "",
|
|
16
16
|
"license": "MIT",
|
|
17
|
-
"main": "dist/index.js",
|
|
18
|
-
"types": "dist/index.d.ts",
|
|
17
|
+
"main": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
19
|
"directories": {
|
|
20
20
|
"lib": "dist"
|
|
21
21
|
},
|
|
@@ -24,33 +24,33 @@
|
|
|
24
24
|
"templates"
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@nestjs/bullmq": "^
|
|
28
|
-
"@nestjs/common": "^
|
|
29
|
-
"@nestjs/core": "^
|
|
30
|
-
"@nestjs/testing": "^
|
|
31
|
-
"@types/
|
|
32
|
-
"@
|
|
27
|
+
"@nestjs/bullmq": "^12.0.0",
|
|
28
|
+
"@nestjs/common": "^12.0.1",
|
|
29
|
+
"@nestjs/core": "^12.0.1",
|
|
30
|
+
"@nestjs/testing": "^12.0.1",
|
|
31
|
+
"@types/node": "^26.0.0",
|
|
32
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
33
33
|
"bullmq": "^5.61.0",
|
|
34
34
|
"dotenv": "^17.2.3",
|
|
35
35
|
"eslint": "^9.39.3",
|
|
36
|
-
"jest": "^29.7.0",
|
|
37
36
|
"reflect-metadata": "^0.2.2",
|
|
38
37
|
"rxjs": "^7.8.2",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"@nest-boot/eslint-
|
|
43
|
-
"@nest-boot/request-context": "^
|
|
44
|
-
"@nest-boot/
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
40
|
+
"vitest": "^4.1.11",
|
|
41
|
+
"@nest-boot/eslint-config": "^8.0.0-beta.1",
|
|
42
|
+
"@nest-boot/request-context": "^8.0.0-beta.1",
|
|
43
|
+
"@nest-boot/eslint-plugin": "^8.0.0-beta.1",
|
|
44
|
+
"@nest-boot/tsconfig": "^8.0.0-beta.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@
|
|
48
|
-
"@nestjs/
|
|
49
|
-
"@nestjs/
|
|
50
|
-
"@nestjs/core": "^11.0.0",
|
|
47
|
+
"@nestjs/bullmq": "^12.0.0",
|
|
48
|
+
"@nestjs/common": "^12.0.0",
|
|
49
|
+
"@nestjs/core": "^12.0.0",
|
|
51
50
|
"bullmq": "^5.0.0",
|
|
52
51
|
"reflect-metadata": "^0.2.2",
|
|
53
|
-
"rxjs": "^7.0.0"
|
|
52
|
+
"rxjs": "^7.0.0",
|
|
53
|
+
"@nest-boot/request-context": "^8.0.0-beta.1"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
@@ -61,8 +61,16 @@
|
|
|
61
61
|
"eslint --fix"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"
|
|
65
|
-
|
|
64
|
+
"type": "module",
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=26.0.0"
|
|
67
|
+
},
|
|
68
|
+
"exports": {
|
|
69
|
+
".": {
|
|
70
|
+
"types": "./dist/index.d.ts",
|
|
71
|
+
"import": "./dist/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./package.json": "./package.json"
|
|
66
74
|
},
|
|
67
75
|
"scripts": {
|
|
68
76
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -70,9 +78,9 @@
|
|
|
70
78
|
"dev": "tsc -w -p tsconfig.build.json",
|
|
71
79
|
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
72
80
|
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
73
|
-
"test": "
|
|
74
|
-
"test:cov": "
|
|
75
|
-
"test:watch": "
|
|
76
|
-
"test:debug": "
|
|
81
|
+
"test": "vitest run",
|
|
82
|
+
"test:cov": "vitest run --coverage",
|
|
83
|
+
"test:watch": "vitest",
|
|
84
|
+
"test:debug": "vitest --inspect-brk --no-file-parallelism"
|
|
77
85
|
}
|
|
78
86
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constants_1 = require("@nestjs/common/constants");
|
|
4
|
-
let mockForRootAsyncOptions;
|
|
5
|
-
const mockBaseBullModule = {
|
|
6
|
-
forRootAsync: jest.fn((options) => {
|
|
7
|
-
mockForRootAsyncOptions = options;
|
|
8
|
-
return {
|
|
9
|
-
module: class BaseRootModule {
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
}),
|
|
13
|
-
registerQueue: jest.fn(),
|
|
14
|
-
registerQueueAsync: jest.fn(),
|
|
15
|
-
};
|
|
16
|
-
jest.mock("@nestjs/bullmq", () => ({
|
|
17
|
-
BullModule: mockBaseBullModule,
|
|
18
|
-
QueueEventsListener: class QueueEventsListener {
|
|
19
|
-
},
|
|
20
|
-
}));
|
|
21
|
-
const bullmq_module_1 = require("./bullmq.module");
|
|
22
|
-
const bullmq_module_definition_1 = require("./bullmq.module-definition");
|
|
23
|
-
const load_config_from_env_util_1 = require("./utils/load-config-from-env.util");
|
|
24
|
-
jest.mock("./utils/load-config-from-env.util", () => ({
|
|
25
|
-
loadConfigFromEnv: jest.fn(() => ({
|
|
26
|
-
host: "redis.local",
|
|
27
|
-
})),
|
|
28
|
-
}));
|
|
29
|
-
describe("BullModule", () => {
|
|
30
|
-
beforeEach(() => {
|
|
31
|
-
jest.clearAllMocks();
|
|
32
|
-
});
|
|
33
|
-
it("should register synchronous and asynchronous options", () => {
|
|
34
|
-
const options = {
|
|
35
|
-
connection: {
|
|
36
|
-
host: "redis.local",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
const dynamicModule = bullmq_module_1.BullModule.forRoot(options);
|
|
40
|
-
const useFactory = () => options;
|
|
41
|
-
const asyncModule = bullmq_module_1.BullModule.forRootAsync({
|
|
42
|
-
useFactory,
|
|
43
|
-
});
|
|
44
|
-
expect(dynamicModule.module).toBe(bullmq_module_1.BullModule);
|
|
45
|
-
expect(dynamicModule.providers).toEqual(expect.arrayContaining([
|
|
46
|
-
{
|
|
47
|
-
provide: bullmq_module_definition_1.BASE_MODULE_OPTIONS_TOKEN,
|
|
48
|
-
useValue: options,
|
|
49
|
-
},
|
|
50
|
-
]));
|
|
51
|
-
expect(asyncModule.providers).toEqual(expect.arrayContaining([
|
|
52
|
-
{
|
|
53
|
-
inject: [],
|
|
54
|
-
provide: bullmq_module_definition_1.BASE_MODULE_OPTIONS_TOKEN,
|
|
55
|
-
useFactory,
|
|
56
|
-
},
|
|
57
|
-
]));
|
|
58
|
-
});
|
|
59
|
-
it("should provide empty options when base options are missing", () => {
|
|
60
|
-
const providers = Reflect.getMetadata(constants_1.MODULE_METADATA.PROVIDERS, bullmq_module_1.BullModule);
|
|
61
|
-
const optionsProvider = providers.find((provider) => provider.provide === bullmq_module_definition_1.MODULE_OPTIONS_TOKEN);
|
|
62
|
-
expect(optionsProvider).toBeDefined();
|
|
63
|
-
expect(optionsProvider?.useFactory(undefined)).toEqual({});
|
|
64
|
-
expect(optionsProvider?.useFactory({
|
|
65
|
-
prefix: "jobs",
|
|
66
|
-
})).toEqual({
|
|
67
|
-
prefix: "jobs",
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
it("should merge module options with environment Redis config", () => {
|
|
71
|
-
const imports = Reflect.getMetadata(constants_1.MODULE_METADATA.IMPORTS, bullmq_module_1.BullModule);
|
|
72
|
-
expect(mockForRootAsyncOptions).toEqual(expect.objectContaining({
|
|
73
|
-
inject: [bullmq_module_definition_1.MODULE_OPTIONS_TOKEN],
|
|
74
|
-
}));
|
|
75
|
-
expect(mockForRootAsyncOptions.useFactory({
|
|
76
|
-
prefix: "jobs",
|
|
77
|
-
})).toEqual({
|
|
78
|
-
connection: {
|
|
79
|
-
host: "redis.local",
|
|
80
|
-
},
|
|
81
|
-
prefix: "jobs",
|
|
82
|
-
});
|
|
83
|
-
expect(mockForRootAsyncOptions.useFactory({
|
|
84
|
-
connection: {
|
|
85
|
-
host: "custom.redis",
|
|
86
|
-
},
|
|
87
|
-
})).toEqual({
|
|
88
|
-
connection: {
|
|
89
|
-
host: "custom.redis",
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
expect(load_config_from_env_util_1.loadConfigFromEnv).toHaveBeenCalledTimes(1);
|
|
93
|
-
expect(imports).toEqual([
|
|
94
|
-
{
|
|
95
|
-
module: expect.any(Function),
|
|
96
|
-
},
|
|
97
|
-
]);
|
|
98
|
-
});
|
|
99
|
-
it("should delegate queue registration to the base Bull module", () => {
|
|
100
|
-
const queueModule = {
|
|
101
|
-
module: class QueueModule {
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
const asyncQueueModule = {
|
|
105
|
-
module: class AsyncQueueModule {
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
mockBaseBullModule.registerQueue.mockReturnValue(queueModule);
|
|
109
|
-
mockBaseBullModule.registerQueueAsync.mockReturnValue(asyncQueueModule);
|
|
110
|
-
expect(bullmq_module_1.BullModule.registerQueue({ name: "email" })).toBe(queueModule);
|
|
111
|
-
expect(bullmq_module_1.BullModule.registerQueueAsync({
|
|
112
|
-
name: "email",
|
|
113
|
-
useFactory: () => ({}),
|
|
114
|
-
})).toBe(asyncQueueModule);
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=bullmq.module.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq.module.spec.js","sourceRoot":"","sources":["../src/bullmq.module.spec.ts"],"names":[],"mappings":"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"}
|
package/dist/index.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index.spec.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const publicApi = __importStar(require("."));
|
|
37
|
-
const bullmq_module_1 = require("./bullmq.module");
|
|
38
|
-
const processor_decorator_1 = require("./processor.decorator");
|
|
39
|
-
describe("public API", () => {
|
|
40
|
-
it("should export Bull module and upstream BullMQ helpers", () => {
|
|
41
|
-
expect(publicApi.BullModule).toBe(bullmq_module_1.BullModule);
|
|
42
|
-
expect(publicApi.Processor).toBe(processor_decorator_1.Processor);
|
|
43
|
-
expect(publicApi.WorkerHost).toBeDefined();
|
|
44
|
-
expect(publicApi.QueueEventsListener).toBeDefined();
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=index.spec.js.map
|
package/dist/index.spec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,mDAA6C;AAC7C,+DAAkD;AAElD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,0BAAU,CAAC,CAAC;QAC9C,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,+BAAS,CAAC,CAAC;QAC5C,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|