@biorate/axios 3.0.1 → 3.1.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/cjs/src/index.js +4 -4
- package/dist/esm/src/index.js +1 -1
- package/package.json +5 -5
package/dist/cjs/src/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
30
30
|
var _Axios_client;
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
32
|
exports.Axios = void 0;
|
|
33
|
-
const
|
|
33
|
+
const lodash_es_1 = require("lodash-es");
|
|
34
34
|
const axios_1 = __importDefault(require("axios"));
|
|
35
35
|
const axios_retry_1 = __importDefault(require("axios-retry"));
|
|
36
36
|
const path_to_url_1 = __importDefault(require("path-to-url"));
|
|
@@ -91,18 +91,18 @@ class Axios extends singleton_1.Singleton {
|
|
|
91
91
|
return result;
|
|
92
92
|
}
|
|
93
93
|
async fetch(options) {
|
|
94
|
-
const settings = (0,
|
|
94
|
+
const settings = (0, lodash_es_1.merge)({ ...this }, options);
|
|
95
95
|
if (!__classPrivateFieldGet(this, _Axios_client, "f")) {
|
|
96
96
|
__classPrivateFieldSet(this, _Axios_client, axios_1.default.create(), "f");
|
|
97
97
|
if (settings.retry)
|
|
98
|
-
(0, axios_retry_1.default)(__classPrivateFieldGet(this, _Axios_client, "f"), (0,
|
|
98
|
+
(0, axios_retry_1.default)(__classPrivateFieldGet(this, _Axios_client, "f"), (0, lodash_es_1.pick)(this, axiosRetryConfigKeys));
|
|
99
99
|
}
|
|
100
100
|
if (settings.baseURL && settings.path)
|
|
101
101
|
settings.baseURL = (0, path_to_url_1.default)(settings.baseURL, settings.path);
|
|
102
102
|
if (settings.url && settings.path)
|
|
103
103
|
settings.url = (0, path_to_url_1.default)(settings.url, settings.path);
|
|
104
104
|
const params = {
|
|
105
|
-
...(0,
|
|
105
|
+
...(0, lodash_es_1.omit)(settings, axiosRetryConfigKeys.concat(axiosExcludeKeys)),
|
|
106
106
|
};
|
|
107
107
|
await this.before(params);
|
|
108
108
|
const startTime = this.getStartTime();
|
package/dist/esm/src/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
12
|
var _Axios_client;
|
|
13
|
-
import { omit, pick, merge } from 'lodash';
|
|
13
|
+
import { omit, pick, merge } from 'lodash-es';
|
|
14
14
|
import axios from 'axios';
|
|
15
15
|
import retry from 'axios-retry';
|
|
16
16
|
import pathToUrl from 'path-to-url';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biorate/axios",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Axios OOP static interface",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
],
|
|
48
48
|
"author": "llevkin",
|
|
49
49
|
"license": "MIT",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "ca18c1129712e77a6ec8fb2033a54f94e5620ce0",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@biorate/singleton": "2.0.0",
|
|
53
53
|
"axios": "1.15.1",
|
|
54
54
|
"axios-retry": "4.5.0",
|
|
55
55
|
"http-status": "2.1.0",
|
|
56
|
-
"lodash": "4.17.23",
|
|
56
|
+
"lodash-es": "4.17.23",
|
|
57
57
|
"path-to-url": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@biorate/config": "3.0
|
|
61
|
-
"@biorate/inversion": "3.0.
|
|
60
|
+
"@biorate/config": "3.1.0",
|
|
61
|
+
"@biorate/inversion": "3.0.2"
|
|
62
62
|
}
|
|
63
63
|
}
|