@tsed/bullmq 8.33.0 → 8.35.0

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/README.md CHANGED
@@ -265,7 +265,6 @@ Start and completion are logged at level `info`; failures are logged at level `e
265
265
  To change or disable this behavior, set `logLevel` in the configuration.
266
266
 
267
267
  ```ts
268
-
269
268
  @Configuration({
270
269
  bullmq: {
271
270
  // ...
@@ -274,12 +273,10 @@ To change or disable this behavior, set `logLevel` in the configuration.
274
273
  }
275
274
  })
276
275
  export class Server {}
277
-
278
276
  ```
279
277
 
280
278
  **Note**: The module logs when job controller is missing as `warn`. This cannot be separetely controlled.
281
279
 
282
-
283
280
  ## Contributors
284
281
 
285
282
  <a href="https://github.com/tsedio/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
@@ -1,14 +1,14 @@
1
- import { constant, DIContext, inject, injectable, injectMany, injector, logger, ProviderType, runInContext } from "@tsed/di";
2
- import { getComputedType } from "@tsed/schema";
3
- import { v4 } from "uuid";
4
- import { BullMQTypes } from "./constants/BullMQTypes.js";
1
+ import { DIContext, ProviderType, constant, inject, injectMany, injectable, injector, logger, runInContext } from "@tsed/di";
2
+ import { getFallbackJobToken, getJobToken } from "./utils/getJobToken.js";
5
3
  import { BULLMQ } from "./constants/constants.js";
4
+ import { BullMQTypes } from "./constants/BullMQTypes.js";
6
5
  import { JobDispatcher } from "./dispatchers/index.js";
7
6
  import { createQueueProvider } from "./utils/createQueueProvider.js";
8
7
  import { createWorkerProvider } from "./utils/createWorkerProvider.js";
9
- import { getFallbackJobToken, getJobToken } from "./utils/getJobToken.js";
8
+ import { getComputedType } from "@tsed/schema";
10
9
  import { mapQueueOptions } from "./utils/mapQueueOptions.js";
11
10
  import { mapWorkerOptions } from "./utils/mapWorkerOptions.js";
11
+ import { v4 } from "uuid";
12
12
  export class BullMQModule {
13
13
  constructor() {
14
14
  this.dispatcher = inject(JobDispatcher);
@@ -1,8 +1,8 @@
1
1
  import { StoreMerge, useDecorators } from "@tsed/core";
2
- import { Injectable } from "@tsed/di";
3
- import { BullMQTypes } from "../constants/BullMQTypes.js";
4
- import { BULLMQ } from "../constants/constants.js";
5
2
  import { getFallbackJobToken, getJobToken } from "../utils/getJobToken.js";
3
+ import { BULLMQ } from "../constants/constants.js";
4
+ import { BullMQTypes } from "../constants/BullMQTypes.js";
5
+ import { Injectable } from "@tsed/di";
6
6
  export function JobController(name, queue = "default", opts = {}) {
7
7
  return useDecorators(StoreMerge(BULLMQ, {
8
8
  name,
@@ -1,5 +1,5 @@
1
- import { inject, injectable } from "@tsed/di";
2
1
  import { Queue } from "bullmq";
2
+ import { inject, injectable } from "@tsed/di";
3
3
  import { getQueueToken } from "./getQueueToken.js";
4
4
  export function createQueueProvider(queue, opts) {
5
5
  const token = getQueueToken(queue);
@@ -1,5 +1,5 @@
1
- import { inject, injectable } from "@tsed/di";
2
1
  import { Worker } from "bullmq";
2
+ import { inject, injectable } from "@tsed/di";
3
3
  import { BullMQTypes } from "../constants/BullMQTypes.js";
4
4
  import { getWorkerToken } from "./getWorkerToken.js";
5
5
  export function createWorkerProvider(worker, process, opts) {
@@ -1,6 +1,6 @@
1
- import { Type } from "@tsed/core";
2
1
  import { Job as BullMQJob, JobsOptions } from "bullmq";
3
2
  import { JobMethods } from "../contracts/index.js";
3
+ import { Type } from "@tsed/core";
4
4
  import type { JobDispatcherOptions } from "./JobDispatcherOptions.js";
5
5
  export declare class JobDispatcher {
6
6
  dispatch<T extends JobMethods>(job: Type<T>, payload?: Parameters<T["handle"]>[0], options?: JobsOptions): Promise<BullMQJob>;
@@ -1,3 +1,3 @@
1
- import type { QueueOptions } from "bullmq";
2
1
  import { BullMQConfig } from "../config/config.js";
2
+ import type { QueueOptions } from "bullmq";
3
3
  export declare function mapQueueOptions(queue: string, bullMQConfig: BullMQConfig): QueueOptions;
@@ -1,3 +1,3 @@
1
- import type { WorkerOptions } from "bullmq";
2
1
  import { BullMQConfig } from "../config/config.js";
2
+ import type { WorkerOptions } from "bullmq";
3
3
  export declare function mapWorkerOptions(queue: string, bullMQConfig: BullMQConfig): WorkerOptions;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@tsed/bullmq",
3
+ "version": "8.35.0",
3
4
  "description": "BullMQ integration for Ts.ED",
4
- "type": "module",
5
- "version": "8.33.0",
6
5
  "keywords": [
7
- "Ts.ED",
8
- "BullMQ"
6
+ "BullMQ",
7
+ "Ts.ED"
9
8
  ],
10
9
  "source": "./src/index.ts",
10
+ "type": "module",
11
11
  "main": "./lib/esm/index.js",
12
12
  "module": "./lib/esm/index.js",
13
13
  "typings": "./lib/types/index.d.ts",
@@ -30,14 +30,13 @@
30
30
  "tslib": ">=2.7.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@tsed/barrels": "8.33.0",
34
- "@tsed/core": "8.33.0",
35
- "@tsed/di": "8.33.0",
36
- "@tsed/platform-http": "8.33.0",
37
- "@tsed/schema": "8.33.0",
38
- "@tsed/typescript": "8.33.0",
33
+ "@tsed/barrels": "8.35.0",
34
+ "@tsed/core": "8.35.0",
35
+ "@tsed/di": "8.35.0",
36
+ "@tsed/platform-http": "8.35.0",
37
+ "@tsed/schema": "8.35.0",
38
+ "@tsed/typescript": "8.35.0",
39
39
  "bullmq": "^4.12.3 || ^5.1.1",
40
- "eslint": "9.12.0",
41
40
  "ts-mockito": "^2.6.1",
42
41
  "typescript": "6.0.2",
43
42
  "vitest": "4.1.4"