@evlop/commons 1.0.295 → 1.0.296
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/helpers/axiosClient.d.ts +5 -0
- package/dist/cjs/src/helpers/axiosClient.d.ts.map +1 -1
- package/dist/cjs/src/helpers/axiosClient.js +8 -7
- package/dist/cjs/src/helpers/axiosClient.js.map +1 -1
- package/dist/esm/src/helpers/axiosClient.d.ts +5 -0
- package/dist/esm/src/helpers/axiosClient.d.ts.map +1 -1
- package/dist/esm/src/helpers/axiosClient.js +7 -6
- package/dist/esm/src/helpers/axiosClient.js.map +1 -1
- package/dist/types/src/helpers/axiosClient.d.ts +5 -0
- package/dist/types/src/helpers/axiosClient.d.ts.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,+
|
1
|
+
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;CAIvB,CAAA;AAED,eAAO,MAAM,WAAW,+BAGtB,CAAC;AAOF,eAAe,WAAW,CAAC"}
|
@@ -3,17 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.axiosClient = void 0;
|
6
|
+
exports.axiosClient = exports.httpHeaders = void 0;
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
8
|
-
const constants_1 = require("../constants");
|
9
8
|
const axios_retry_1 = __importDefault(require("axios-retry"));
|
9
|
+
const constants_1 = require("../constants");
|
10
|
+
exports.httpHeaders = {
|
11
|
+
'x-platform-os': constants_1.PLATFORM_OS,
|
12
|
+
'x-bundle-version': constants_1.BUNDLE_VERSION,
|
13
|
+
'x-client-type': constants_1.CLIENT_TYPE
|
14
|
+
};
|
10
15
|
exports.axiosClient = axios_1.default.create({
|
11
16
|
baseURL: constants_1.API_BASE_URL || '/api',
|
12
|
-
headers:
|
13
|
-
'x-platform-os': constants_1.PLATFORM_OS,
|
14
|
-
'x-bundle-version': constants_1.BUILD_VERSION,
|
15
|
-
'x-client-type': constants_1.CLIENT_TYPE
|
16
|
-
}
|
17
|
+
headers: exports.httpHeaders,
|
17
18
|
});
|
18
19
|
axios_retry_1.default(exports.axiosClient, {
|
19
20
|
retries: constants_1.AXIOS_RETRY_COUNT,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,8DAAqC;AACrC,4CAAyG;AAE5F,QAAA,WAAW,GAAG;IACvB,eAAe,EAAE,uBAAW;IAC5B,kBAAkB,EAAE,0BAAc;IAClC,eAAe,EAAE,uBAAW;CAC/B,CAAA;AAEY,QAAA,WAAW,GAAG,eAAK,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,wBAAY,IAAI,MAAM;IAC/B,OAAO,EAAE,mBAAW;CACvB,CAAC,CAAC;AAEH,qBAAU,CAAC,mBAAW,EAAE;IACpB,OAAO,EAAE,6BAAiB;IAC1B,UAAU,EAAE,CAAC,WAAW,EAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,qBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvF,CAAC,CAAC;AAEH,kBAAe,mBAAW,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,+
|
1
|
+
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;CAIvB,CAAA;AAED,eAAO,MAAM,WAAW,+BAGtB,CAAC;AAOF,eAAe,WAAW,CAAC"}
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import Axios from "axios";
|
2
|
-
import { API_BASE_URL, AXIOS_RETRY_COUNT, BUILD_VERSION, CLIENT_TYPE, PLATFORM_OS } from "../constants";
|
3
2
|
import axiosRetry from "axios-retry";
|
3
|
+
import { API_BASE_URL, AXIOS_RETRY_COUNT, BUNDLE_VERSION, CLIENT_TYPE, PLATFORM_OS } from "../constants";
|
4
|
+
export const httpHeaders = {
|
5
|
+
'x-platform-os': PLATFORM_OS,
|
6
|
+
'x-bundle-version': BUNDLE_VERSION,
|
7
|
+
'x-client-type': CLIENT_TYPE
|
8
|
+
};
|
4
9
|
export const axiosClient = Axios.create({
|
5
10
|
baseURL: API_BASE_URL || '/api',
|
6
|
-
headers:
|
7
|
-
'x-platform-os': PLATFORM_OS,
|
8
|
-
'x-bundle-version': BUILD_VERSION,
|
9
|
-
'x-client-type': CLIENT_TYPE
|
10
|
-
}
|
11
|
+
headers: httpHeaders,
|
11
12
|
});
|
12
13
|
axiosRetry(axiosClient, {
|
13
14
|
retries: AXIOS_RETRY_COUNT,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,
|
1
|
+
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEzG,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,eAAe,EAAE,WAAW;IAC5B,kBAAkB,EAAE,cAAc;IAClC,eAAe,EAAE,WAAW;CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,YAAY,IAAI,MAAM;IAC/B,OAAO,EAAE,WAAW;CACvB,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,EAAE;IACpB,OAAO,EAAE,iBAAiB;IAC1B,UAAU,EAAE,CAAC,WAAW,EAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,+
|
1
|
+
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW;;;;CAIvB,CAAA;AAED,eAAO,MAAM,WAAW,+BAGtB,CAAC;AAOF,eAAe,WAAW,CAAC"}
|