@midwayjs/etcd 3.19.0 → 4.0.0-alpha.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/dist/configuration.js +2 -2
- package/dist/manager.js +5 -6
- package/package.json +6 -6
package/dist/configuration.js
CHANGED
|
@@ -15,7 +15,8 @@ let ETCDConfiguration = class ETCDConfiguration {
|
|
|
15
15
|
await container.getAsync(manager_1.ETCDServiceFactory);
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
ETCDConfiguration =
|
|
18
|
+
exports.ETCDConfiguration = ETCDConfiguration;
|
|
19
|
+
exports.ETCDConfiguration = ETCDConfiguration = __decorate([
|
|
19
20
|
(0, core_1.Configuration)({
|
|
20
21
|
namespace: 'etcd',
|
|
21
22
|
importConfigs: [
|
|
@@ -25,5 +26,4 @@ ETCDConfiguration = __decorate([
|
|
|
25
26
|
],
|
|
26
27
|
})
|
|
27
28
|
], ETCDConfiguration);
|
|
28
|
-
exports.ETCDConfiguration = ETCDConfiguration;
|
|
29
29
|
//# sourceMappingURL=configuration.js.map
|
package/dist/manager.js
CHANGED
|
@@ -27,6 +27,7 @@ let ETCDServiceFactory = class ETCDServiceFactory extends core_1.ServiceFactory
|
|
|
27
27
|
await client.close();
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
+
exports.ETCDServiceFactory = ETCDServiceFactory;
|
|
30
31
|
__decorate([
|
|
31
32
|
(0, core_1.Config)('etcd'),
|
|
32
33
|
__metadata("design:type", Object)
|
|
@@ -41,20 +42,19 @@ __decorate([
|
|
|
41
42
|
(0, core_1.Logger)('coreLogger'),
|
|
42
43
|
__metadata("design:type", Object)
|
|
43
44
|
], ETCDServiceFactory.prototype, "logger", void 0);
|
|
44
|
-
ETCDServiceFactory = __decorate([
|
|
45
|
+
exports.ETCDServiceFactory = ETCDServiceFactory = __decorate([
|
|
45
46
|
(0, core_1.Provide)(),
|
|
46
47
|
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
47
48
|
], ETCDServiceFactory);
|
|
48
|
-
exports.ETCDServiceFactory = ETCDServiceFactory;
|
|
49
49
|
let ETCDService = class ETCDService {
|
|
50
50
|
async init() {
|
|
51
|
-
|
|
52
|
-
this.instance = this.serviceFactory.get(((_b = (_a = this.serviceFactory).getDefaultClientName) === null || _b === void 0 ? void 0 : _b.call(_a)) || 'default');
|
|
51
|
+
this.instance = this.serviceFactory.get(this.serviceFactory.getDefaultClientName?.() || 'default');
|
|
53
52
|
if (!this.instance) {
|
|
54
53
|
throw new core_1.MidwayCommonError('etcd default instance not found.');
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
};
|
|
57
|
+
exports.ETCDService = ETCDService;
|
|
58
58
|
__decorate([
|
|
59
59
|
(0, core_1.Inject)(),
|
|
60
60
|
__metadata("design:type", ETCDServiceFactory)
|
|
@@ -65,10 +65,9 @@ __decorate([
|
|
|
65
65
|
__metadata("design:paramtypes", []),
|
|
66
66
|
__metadata("design:returntype", Promise)
|
|
67
67
|
], ETCDService.prototype, "init", null);
|
|
68
|
-
ETCDService = __decorate([
|
|
68
|
+
exports.ETCDService = ETCDService = __decorate([
|
|
69
69
|
(0, core_1.Provide)(),
|
|
70
70
|
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
71
71
|
], ETCDService);
|
|
72
|
-
exports.ETCDService = ETCDService;
|
|
73
72
|
(0, core_1.delegateTargetAllPrototypeMethod)(ETCDService, etcd3_1.Etcd3);
|
|
74
73
|
//# sourceMappingURL=manager.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/etcd",
|
|
3
3
|
"description": "midway etcd component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0-alpha.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": "^
|
|
14
|
-
"@midwayjs/mock": "^
|
|
13
|
+
"@midwayjs/core": "^4.0.0-alpha.1",
|
|
14
|
+
"@midwayjs/mock": "^4.0.0-alpha.1"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"etcd3": "1.1.2"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc",
|
|
27
|
-
"test": "node
|
|
28
|
-
"cov": "node
|
|
27
|
+
"test": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand",
|
|
28
|
+
"cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit",
|
|
29
29
|
"ci": "npm run test",
|
|
30
30
|
"lint": "mwts check"
|
|
31
31
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"type": "git",
|
|
37
37
|
"url": "https://github.com/midwayjs/midway.git"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
|
|
40
40
|
}
|