@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.
@@ -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
- // import { MidwayConfigMissingError } from '@midwayjs/core';
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, decorator_1.Configuration)({
18
+ (0, core_1.Configuration)({
20
19
  namespace: 'axios',
21
20
  importConfigs: [
22
21
  {
@@ -1,5 +1,4 @@
1
1
  import { AxiosRequestConfig, AxiosResponse, AxiosInterceptorManager } from 'axios';
2
- export declare const AXIOS_INSTANCE_KEY = "axios:instance";
3
2
  export interface AxiosHttpService {
4
3
  interceptors: {
5
4
  request: AxiosInterceptorManager<AxiosRequestConfig>;
package/dist/interface.js CHANGED
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AXIOS_INSTANCE_KEY = void 0;
4
- exports.AXIOS_INSTANCE_KEY = 'axios:instance';
5
3
  //# sourceMappingURL=interface.js.map
@@ -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, decorator_1.Config)('axios'),
36
+ (0, core_1.Config)('axios'),
38
37
  __metadata("design:type", Object)
39
38
  ], HttpServiceFactory.prototype, "axiosConfig", void 0);
40
39
  __decorate([
41
- (0, decorator_1.Init)(),
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, decorator_1.Provide)(),
48
- (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
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, decorator_1.Inject)(),
89
+ (0, core_1.Inject)(),
91
90
  __metadata("design:type", HttpServiceFactory)
92
91
  ], HttpService.prototype, "serviceFactory", void 0);
93
92
  __decorate([
94
- (0, decorator_1.Init)(),
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, decorator_1.Provide)(),
101
- (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
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.5.1",
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.5.1",
14
- "@midwayjs/decorator": "^3.4.11",
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": "3b63fc768617037644602dd5ad66d3734ce01b16"
39
+ "gitHead": "22643b0e8519766bb7c68b975930199fc136336e"
41
40
  }