@midwayjs/redis 3.0.0-beta.7 → 3.0.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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  this is a sub package for midway.
7
7
 
8
- Document: [https://midwayjs.org/midway](https://midwayjs.org/midway)
8
+ Document: [https://midwayjs.org](https://midwayjs.org)
9
9
 
10
10
  ## License
11
11
 
package/dist/manager.js CHANGED
@@ -25,8 +25,7 @@ let RedisServiceFactory = class RedisServiceFactory extends core_1.ServiceFactor
25
25
  config.nodes.forEach(client => {
26
26
  assert(client.host &&
27
27
  client.port &&
28
- client.password !== undefined &&
29
- client.db !== undefined, `[@midwayjs/redis] 'host: ${client.host}', 'port: ${client.port}', 'password: ${client.password}', 'db: ${client.db}' are required on config`);
28
+ `[@midwayjs/redis] 'host: ${client.host}', 'port: ${client.port}' are required on config`);
30
29
  });
31
30
  this.logger.info('[@midwayjs/redis] cluster connecting');
32
31
  client = new Redis.Cluster(config.nodes, config);
@@ -36,16 +35,12 @@ let RedisServiceFactory = class RedisServiceFactory extends core_1.ServiceFactor
36
35
  config.sentinels.forEach(sentinel => {
37
36
  assert(sentinel.host && sentinel.port, `[@midwayjs/redis] 'host: ${sentinel.host}', 'port: ${sentinel.port}' are required on config`);
38
37
  });
39
- assert(config.name && config.password !== undefined && config.db !== undefined, `[@midwayjs/redis] 'name of master: ${config.name}', 'password: ${config.password}', 'db: ${config.db}' are required on config`);
40
38
  this.logger.info('[@midwayjs/redis] sentinel connecting start');
41
39
  client = new Redis(config);
42
40
  }
43
41
  else {
44
- assert(config.host &&
45
- config.port &&
46
- config.password !== undefined &&
47
- config.db !== undefined, `[@midwayjs/redis] 'host: ${config.host}', 'port: ${config.port}', 'password: ${config.password}', 'db: ${config.db}' are required on config`);
48
- this.logger.info('[@midwayjs/redis] server connecting redis://:***@%s:%s/%s', config.host, config.port, config.db);
42
+ assert(config.host && config.port, `[@midwayjs/redis] 'host: ${config.host}', 'port: ${config.port}' are required on config`);
43
+ this.logger.info('[@midwayjs/redis] server connecting redis://:***@%s:%s/%s', config.host, config.port);
49
44
  client = new Redis(config);
50
45
  }
51
46
  client.on('connect', () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/redis",
3
3
  "description": "midway redis component",
4
- "version": "3.0.0-beta.7",
4
+ "version": "3.0.1",
5
5
  "main": "dist/index",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
@@ -10,10 +10,10 @@
10
10
  "index.d.ts"
11
11
  ],
12
12
  "devDependencies": {
13
- "@midwayjs/core": "^3.0.0-beta.7",
14
- "@midwayjs/decorator": "^3.0.0-beta.7",
15
- "@midwayjs/mock": "^3.0.0-beta.7",
16
- "@types/ioredis": "^4.27.1"
13
+ "@midwayjs/core": "^3.0.1",
14
+ "@midwayjs/decorator": "^3.0.0",
15
+ "@midwayjs/mock": "^3.0.1",
16
+ "@types/ioredis": "4.28.7"
17
17
  },
18
18
  "dependencies": {
19
19
  "ioredis": "^4.27.1"
@@ -25,8 +25,8 @@
25
25
  "license": "MIT",
26
26
  "scripts": {
27
27
  "build": "tsc",
28
- "test": "node --require=ts-node/register ../../node_modules/.bin/jest",
29
- "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit",
28
+ "test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
29
+ "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
30
30
  "ci": "npm run test",
31
31
  "lint": "mwts check"
32
32
  },
@@ -37,5 +37,5 @@
37
37
  "type": "git",
38
38
  "url": "https://github.com/midwayjs/midway.git"
39
39
  },
40
- "gitHead": "24590729121d9110e2d960db5b5e587cf55a1efc"
40
+ "gitHead": "f345b4ed0392e5c3b9e815438ef0a377ad6da076"
41
41
  }
package/CHANGELOG.md DELETED
@@ -1,63 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
7
-
8
- **Note:** Version bump only for package @midwayjs/redis
9
-
10
-
11
-
12
-
13
-
14
- # [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
15
-
16
- **Note:** Version bump only for package @midwayjs/redis
17
-
18
-
19
-
20
-
21
-
22
- # [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
23
-
24
- **Note:** Version bump only for package @midwayjs/redis
25
-
26
-
27
-
28
-
29
-
30
- # [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
31
-
32
- **Note:** Version bump only for package @midwayjs/redis
33
-
34
-
35
-
36
-
37
-
38
- # [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
39
-
40
-
41
- ### Features
42
-
43
- * add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
44
-
45
-
46
-
47
-
48
-
49
- # [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
50
-
51
- **Note:** Version bump only for package @midwayjs/redis
52
-
53
-
54
-
55
-
56
-
57
- # [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
58
-
59
-
60
- ### Features
61
-
62
- * add cos component ([#1271](https://github.com/midwayjs/midway/issues/1271)) ([c18e597](https://github.com/midwayjs/midway/commit/c18e597d55a6452188cc7daecd0062bf161028cc))
63
- * add redis component ([#1270](https://github.com/midwayjs/midway/issues/1270)) ([09c993a](https://github.com/midwayjs/midway/commit/09c993ac308d26fa9c742a659471c3f4cf5c5782))