@mondart/nestjs-common-module 2.3.0 → 2.3.2

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 ADDED
@@ -0,0 +1,8 @@
1
+
2
+ ### Make release
3
+
4
+ #### after push to target version branch run the following command to create a release:
5
+
6
+ ```bash
7
+ $ gh release create vx.x.x --target branch -t vx.x.x --notes ""
8
+ ```
@@ -3,7 +3,10 @@ export declare const CACHING_MODULE_OPTIONS = "CACHING_MODULE_OPTIONS";
3
3
  export interface CachingModuleOptions {
4
4
  host: string;
5
5
  port: number;
6
+ username?: string;
6
7
  password: string;
8
+ database?: number;
9
+ tls?: boolean;
7
10
  namespace?: string;
8
11
  ttl?: number;
9
12
  }
@@ -25,6 +25,13 @@ let CachingModule = CachingModule_1 = class CachingModule {
25
25
  new redis_1.Keyv({
26
26
  store: new redis_1.default({
27
27
  url: `redis://${cachingOptions.host}:${cachingOptions.port}`,
28
+ socket: {
29
+ host: cachingOptions.host,
30
+ port: cachingOptions.port,
31
+ tls: cachingOptions.tls || false,
32
+ },
33
+ database: cachingOptions.database,
34
+ username: cachingOptions.username || 'default',
28
35
  password: cachingOptions.password,
29
36
  }),
30
37
  }, {
@@ -59,6 +66,13 @@ let CachingModule = CachingModule_1 = class CachingModule {
59
66
  new redis_1.Keyv({
60
67
  store: new redis_1.default({
61
68
  url: `redis://${cachingOptions.host}:${cachingOptions.port}`,
69
+ socket: {
70
+ host: cachingOptions.host,
71
+ port: cachingOptions.port,
72
+ tls: cachingOptions.tls || false,
73
+ },
74
+ database: cachingOptions.database,
75
+ username: cachingOptions.username || 'default',
62
76
  password: cachingOptions.password,
63
77
  }),
64
78
  }, {
@@ -9,12 +9,18 @@ export interface HealthCheckModuleOptions {
9
9
  redis?: {
10
10
  host: string;
11
11
  port: number;
12
+ username?: string;
12
13
  password?: string;
14
+ database?: number;
15
+ tls?: boolean;
13
16
  };
14
17
  bull?: {
15
18
  host: string;
16
19
  port: number;
20
+ username?: string;
17
21
  password?: string;
22
+ database?: number;
23
+ tls?: boolean;
18
24
  };
19
25
  kafka?: {
20
26
  clientId: string;
@@ -40,7 +40,15 @@ let HealthCheckController = class HealthCheckController {
40
40
  options: {
41
41
  host: this.options?.redis?.host,
42
42
  port: this.options?.redis?.port,
43
+ username: this.options?.redis?.username,
43
44
  password: this.options?.redis?.password,
45
+ db: this.options?.redis?.database,
46
+ tls: this.options?.redis?.tls
47
+ ? {
48
+ host: this.options?.redis?.host,
49
+ port: this.options?.redis?.port,
50
+ }
51
+ : undefined,
44
52
  },
45
53
  }),
46
54
  ]);
@@ -52,7 +60,15 @@ let HealthCheckController = class HealthCheckController {
52
60
  options: {
53
61
  host: this.options?.bull?.host,
54
62
  port: this.options?.bull?.port,
63
+ username: this.options?.bull?.username,
55
64
  password: this.options?.bull?.password,
65
+ db: this.options?.bull?.database,
66
+ tls: this.options?.bull?.tls
67
+ ? {
68
+ host: this.options?.bull?.host,
69
+ port: this.options?.bull?.port,
70
+ }
71
+ : undefined,
56
72
  },
57
73
  }),
58
74
  ]);