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