@midwayjs/etcd 4.1.0 → 4.2.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.
Files changed (2) hide show
  1. package/dist/manager.js +6 -0
  2. package/package.json +4 -4
package/dist/manager.js CHANGED
@@ -25,6 +25,12 @@ let ETCDServiceFactory = class ETCDServiceFactory extends core_1.ServiceFactory
25
25
  traceEnabled;
26
26
  traceInjector;
27
27
  async createClient(config) {
28
+ const { customClientClass, ...otherConfig } = config;
29
+ if (customClientClass) {
30
+ const client = new customClientClass(otherConfig);
31
+ this.bindTraceContext(client);
32
+ return client;
33
+ }
28
34
  this.logger.info('[midway:etcd] init %s', config.hosts);
29
35
  const client = new etcd3_1.Etcd3(config);
30
36
  this.bindTraceContext(client);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/etcd",
3
3
  "description": "midway etcd component",
4
- "version": "4.1.0",
4
+ "version": "4.2.1",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
@@ -10,8 +10,8 @@
10
10
  "index.d.ts"
11
11
  ],
12
12
  "devDependencies": {
13
- "@midwayjs/core": "^4.1.0",
14
- "@midwayjs/mock": "^4.1.0"
13
+ "@midwayjs/core": "^4.2.1",
14
+ "@midwayjs/mock": "^4.2.1"
15
15
  },
16
16
  "dependencies": {
17
17
  "etcd3": "1.1.2"
@@ -36,5 +36,5 @@
36
36
  "type": "git",
37
37
  "url": "https://github.com/midwayjs/midway.git"
38
38
  },
39
- "gitHead": "0e6259f761c64b844c4dcab49372c64902fbd7d8"
39
+ "gitHead": "1b471cc7aa0ea4ec0182c678a2d4321d4eb8dcbf"
40
40
  }