@nest-boot/bullmq 7.0.2 → 7.1.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const load_config_from_env_util_1 = require("./load-config-from-env.util");
4
+ const ORIGINAL_ENV = process.env;
5
+ describe("loadConfigFromEnv", () => {
6
+ beforeEach(() => {
7
+ process.env = Object.fromEntries(Object.entries(ORIGINAL_ENV).filter(([key]) => !key.startsWith("REDIS_")));
8
+ });
9
+ afterAll(() => {
10
+ process.env = ORIGINAL_ENV;
11
+ });
12
+ it("should load Redis config from URL", () => {
13
+ process.env.REDIS_URL = "rediss://user:pass@redis.local:6380/2";
14
+ expect((0, load_config_from_env_util_1.loadConfigFromEnv)()).toEqual({
15
+ db: 2,
16
+ host: "redis.local",
17
+ password: "pass",
18
+ port: 6380,
19
+ tls: {},
20
+ username: "user",
21
+ });
22
+ });
23
+ it("should omit optional URL config when Redis URL does not include it", () => {
24
+ process.env.REDIS_URL = "redis://redis.local";
25
+ expect((0, load_config_from_env_util_1.loadConfigFromEnv)()).toEqual({
26
+ db: undefined,
27
+ host: "redis.local",
28
+ password: "",
29
+ port: undefined,
30
+ username: "",
31
+ });
32
+ });
33
+ it("should load Redis config from host variables", () => {
34
+ process.env.REDIS_HOST = "redis.local";
35
+ process.env.REDIS_PORT = "6379";
36
+ process.env.REDIS_DATABASE = "3";
37
+ process.env.REDIS_USERNAME = "user";
38
+ process.env.REDIS_PASSWORD = "pass";
39
+ process.env.REDIS_TLS = "true";
40
+ expect((0, load_config_from_env_util_1.loadConfigFromEnv)()).toEqual({
41
+ db: 3,
42
+ host: "redis.local",
43
+ password: "pass",
44
+ port: 6379,
45
+ tls: {},
46
+ username: "user",
47
+ });
48
+ });
49
+ it("should omit optional config when environment variables are absent", () => {
50
+ expect((0, load_config_from_env_util_1.loadConfigFromEnv)()).toEqual({
51
+ host: undefined,
52
+ password: undefined,
53
+ username: undefined,
54
+ });
55
+ });
56
+ });
57
+ //# sourceMappingURL=load-config-from-env.util.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-config-from-env.util.spec.js","sourceRoot":"","sources":["../../src/utils/load-config-from-env.util.spec.ts"],"names":[],"mappings":";;AAAA,2EAAgE;AAEhE,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC;AAEjC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,WAAW,CAC9B,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAC1E,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,GAAG,GAAG,YAAY,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,uCAAuC,CAAC;QAEhE,MAAM,CAAC,IAAA,6CAAiB,GAAE,CAAC,CAAC,OAAO,CAAC;YAClC,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,qBAAqB,CAAC;QAE9C,MAAM,CAAC,IAAA,6CAAiB,GAAE,CAAC,CAAC,OAAO,CAAC;YAClC,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,aAAa,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,GAAG,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,MAAM,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,MAAM,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;QAE/B,MAAM,CAAC,IAAA,6CAAiB,GAAE,CAAC,CAAC,OAAO,CAAC;YAClC,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,IAAI;YACV,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,MAAM,CAAC,IAAA,6CAAiB,GAAE,CAAC,CAAC,OAAO,CAAC;YAClC,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@nest-boot/bullmq",
3
- "version": "7.0.2",
3
+ "version": "7.1.0",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/nest-boot/nest-boot.git",
7
+ "directory": "packages/bullmq"
8
+ },
4
9
  "description": "",
5
- "author": "d4rkcr0w <me@d4rkcr0w.com>",
10
+ "author": {
11
+ "name": "Xudong Huang",
12
+ "email": "me@huangxudong.com",
13
+ "url": "https://www.huangxudong.com/"
14
+ },
6
15
  "homepage": "",
7
16
  "license": "MIT",
8
17
  "main": "dist/index.js",
@@ -16,26 +25,26 @@
16
25
  ],
17
26
  "devDependencies": {
18
27
  "@nestjs/bullmq": "^11.0.4",
19
- "@nestjs/common": "^11.1.9",
20
- "@nestjs/core": "^11.1.9",
21
- "@nestjs/testing": "^11.1.9",
28
+ "@nestjs/common": "^11.1.11",
29
+ "@nestjs/core": "^11.1.11",
30
+ "@nestjs/testing": "^11.1.11",
22
31
  "@types/jest": "^29.5.14",
23
- "@types/node": "^22.18.6",
32
+ "@types/node": "^24.12.4",
24
33
  "bullmq": "^5.61.0",
25
34
  "dotenv": "^17.2.3",
26
- "eslint": "^9.36.0",
35
+ "eslint": "^9.39.3",
27
36
  "jest": "^29.7.0",
28
37
  "reflect-metadata": "^0.2.2",
29
38
  "rxjs": "^7.8.2",
30
39
  "ts-jest": "^29.4.4",
31
40
  "typescript": "^5.9.3",
32
- "@nest-boot/eslint-config": "^7.0.2",
33
- "@nest-boot/eslint-plugin": "^7.0.3",
34
- "@nest-boot/request-context": "^7.4.2",
35
- "@nest-boot/tsconfig": "^7.0.1"
41
+ "@nest-boot/eslint-config": "^7.1.0",
42
+ "@nest-boot/request-context": "^7.5.0",
43
+ "@nest-boot/tsconfig": "^7.1.0",
44
+ "@nest-boot/eslint-plugin": "^7.0.8"
36
45
  },
37
46
  "peerDependencies": {
38
- "@nest-boot/request-context": "^7.4.2",
47
+ "@nest-boot/request-context": "^7.4.3",
39
48
  "@nestjs/bullmq": "^11.0.0",
40
49
  "@nestjs/common": "^11.0.0",
41
50
  "@nestjs/core": "^11.0.0",
@@ -57,9 +66,10 @@
57
66
  },
58
67
  "scripts": {
59
68
  "build": "tsc -p tsconfig.build.json",
60
- "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
69
+ "clean": "rm -rf .nx && rm -rf node_modules && rm -rf dist",
61
70
  "dev": "tsc -w -p tsconfig.build.json",
62
- "lint": "eslint \"{src,test}/**/*.ts\" --fix",
71
+ "lint": "eslint \"{src,test}/**/*.ts\"",
72
+ "lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
63
73
  "test": "jest",
64
74
  "test:cov": "jest --coverage",
65
75
  "test:watch": "jest --watch",