@midwayjs/axios 4.0.0-beta.1 → 4.0.0-beta.11

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/README.md CHANGED
@@ -9,4 +9,4 @@ Document: [https://midwayjs.org](https://midwayjs.org)
9
9
 
10
10
  ## License
11
11
 
12
- [MIT]((https://github.com/midwayjs/midway/blob/master/LICENSE))
12
+ [MIT](https://github.com/midwayjs/midway/blob/master/LICENSE)
@@ -10,8 +10,8 @@ export declare class HttpService {
10
10
  };
11
11
  };
12
12
  get interceptors(): {
13
- request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig<any>>;
14
- response: import("axios").AxiosInterceptorManager<import("axios").AxiosResponse<any, any>>;
13
+ request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig>;
14
+ response: import("axios").AxiosInterceptorManager<import("axios").AxiosResponse>;
15
15
  };
16
16
  getUri(config?: AxiosRequestConfig): string;
17
17
  request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
@@ -13,6 +13,7 @@ exports.HttpServiceFactory = void 0;
13
13
  const core_1 = require("@midwayjs/core");
14
14
  const axios = require("axios");
15
15
  let HttpServiceFactory = class HttpServiceFactory extends core_1.ServiceFactory {
16
+ axiosConfig;
16
17
  async init() {
17
18
  let axiosConfig = this.axiosConfig;
18
19
  if (!this.axiosConfig['clients']) {
@@ -13,6 +13,8 @@ exports.HttpService = void 0;
13
13
  const core_1 = require("@midwayjs/core");
14
14
  const http_service_factory_1 = require("./http-service.factory");
15
15
  let HttpService = class HttpService {
16
+ instance;
17
+ serviceFactory;
16
18
  async init() {
17
19
  const clientName = this.serviceFactory.getDefaultClientName() || 'default';
18
20
  this.instance = this.serviceFactory.get(clientName);
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": "4.0.0-beta.1",
4
+ "version": "4.0.0-beta.11",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
@@ -10,12 +10,12 @@
10
10
  "index.d.ts"
11
11
  ],
12
12
  "devDependencies": {
13
- "@midwayjs/core": "^4.0.0-beta.1",
14
- "@midwayjs/mock": "^4.0.0-beta.1",
13
+ "@midwayjs/core": "^4.0.0-beta.11",
14
+ "@midwayjs/mock": "^4.0.0-beta.11",
15
15
  "nock": "13.5.6"
16
16
  },
17
17
  "dependencies": {
18
- "axios": "1.8.4"
18
+ "axios": "1.12.0"
19
19
  },
20
20
  "keywords": [
21
21
  "http client",
@@ -31,11 +31,11 @@
31
31
  "lint": "mwts check"
32
32
  },
33
33
  "engines": {
34
- "node": ">=12"
34
+ "node": ">=20"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
38
38
  "url": "https://github.com/midwayjs/midway.git"
39
39
  },
40
- "gitHead": "832961ec3aff123c033197d8c00cb2bc9bad7ff8"
40
+ "gitHead": "6ef05719ca6e900f1ec34aff7a5c5a9614358c50"
41
41
  }