@midwayjs/axios 3.5.1 → 3.6.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.
- package/dist/configuration.js +2 -3
- package/dist/interface.d.ts +0 -1
- package/dist/interface.js +0 -2
- package/dist/serviceManager.js +8 -9
- package/package.json +4 -5
package/dist/configuration.js
CHANGED
|
@@ -7,8 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.AxiosConfiguration = void 0;
|
|
10
|
-
|
|
11
|
-
const decorator_1 = require("@midwayjs/decorator");
|
|
10
|
+
const core_1 = require("@midwayjs/core");
|
|
12
11
|
const serviceManager_1 = require("./serviceManager");
|
|
13
12
|
let AxiosConfiguration = class AxiosConfiguration {
|
|
14
13
|
async onReady(container) {
|
|
@@ -16,7 +15,7 @@ let AxiosConfiguration = class AxiosConfiguration {
|
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
17
|
AxiosConfiguration = __decorate([
|
|
19
|
-
(0,
|
|
18
|
+
(0, core_1.Configuration)({
|
|
20
19
|
namespace: 'axios',
|
|
21
20
|
importConfigs: [
|
|
22
21
|
{
|
package/dist/interface.d.ts
CHANGED
package/dist/interface.js
CHANGED
package/dist/serviceManager.js
CHANGED
|
@@ -11,7 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.HttpService = exports.HttpServiceFactory = void 0;
|
|
13
13
|
const axios_1 = require("axios");
|
|
14
|
-
const decorator_1 = require("@midwayjs/decorator");
|
|
15
14
|
const core_1 = require("@midwayjs/core");
|
|
16
15
|
let HttpServiceFactory = class HttpServiceFactory extends core_1.ServiceFactory {
|
|
17
16
|
async init() {
|
|
@@ -34,18 +33,18 @@ let HttpServiceFactory = class HttpServiceFactory extends core_1.ServiceFactory
|
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
__decorate([
|
|
37
|
-
(0,
|
|
36
|
+
(0, core_1.Config)('axios'),
|
|
38
37
|
__metadata("design:type", Object)
|
|
39
38
|
], HttpServiceFactory.prototype, "axiosConfig", void 0);
|
|
40
39
|
__decorate([
|
|
41
|
-
(0,
|
|
40
|
+
(0, core_1.Init)(),
|
|
42
41
|
__metadata("design:type", Function),
|
|
43
42
|
__metadata("design:paramtypes", []),
|
|
44
43
|
__metadata("design:returntype", Promise)
|
|
45
44
|
], HttpServiceFactory.prototype, "init", null);
|
|
46
45
|
HttpServiceFactory = __decorate([
|
|
47
|
-
(0,
|
|
48
|
-
(0,
|
|
46
|
+
(0, core_1.Provide)(),
|
|
47
|
+
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
49
48
|
], HttpServiceFactory);
|
|
50
49
|
exports.HttpServiceFactory = HttpServiceFactory;
|
|
51
50
|
let HttpService = class HttpService {
|
|
@@ -87,18 +86,18 @@ let HttpService = class HttpService {
|
|
|
87
86
|
}
|
|
88
87
|
};
|
|
89
88
|
__decorate([
|
|
90
|
-
(0,
|
|
89
|
+
(0, core_1.Inject)(),
|
|
91
90
|
__metadata("design:type", HttpServiceFactory)
|
|
92
91
|
], HttpService.prototype, "serviceFactory", void 0);
|
|
93
92
|
__decorate([
|
|
94
|
-
(0,
|
|
93
|
+
(0, core_1.Init)(),
|
|
95
94
|
__metadata("design:type", Function),
|
|
96
95
|
__metadata("design:paramtypes", []),
|
|
97
96
|
__metadata("design:returntype", Promise)
|
|
98
97
|
], HttpService.prototype, "init", null);
|
|
99
98
|
HttpService = __decorate([
|
|
100
|
-
(0,
|
|
101
|
-
(0,
|
|
99
|
+
(0, core_1.Provide)(),
|
|
100
|
+
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
102
101
|
], HttpService);
|
|
103
102
|
exports.HttpService = HttpService;
|
|
104
103
|
//# sourceMappingURL=serviceManager.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/axios",
|
|
3
3
|
"description": "midway http client with axios",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.0",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^3.
|
|
14
|
-
"@midwayjs/
|
|
15
|
-
"@midwayjs/mock": "^3.5.1"
|
|
13
|
+
"@midwayjs/core": "^3.6.0",
|
|
14
|
+
"@midwayjs/mock": "^3.6.0"
|
|
16
15
|
},
|
|
17
16
|
"dependencies": {
|
|
18
17
|
"axios": "0.27.2"
|
|
@@ -37,5 +36,5 @@
|
|
|
37
36
|
"type": "git",
|
|
38
37
|
"url": "https://github.com/midwayjs/midway.git"
|
|
39
38
|
},
|
|
40
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "22643b0e8519766bb7c68b975930199fc136336e"
|
|
41
40
|
}
|