@autofleet/node-common 1.1.56 → 1.1.59
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/network/index.js +2 -3
- package/package.json +5 -4
package/network/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const HTTPMethods = [
|
|
|
23
23
|
];
|
|
24
24
|
|
|
25
25
|
const defaultSettings = {
|
|
26
|
-
timeout:
|
|
26
|
+
timeout: 10000,
|
|
27
27
|
headers: { 'X-AF-AUTH': 'ANYONE' },
|
|
28
28
|
paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
|
|
29
29
|
};
|
|
@@ -67,11 +67,10 @@ module.exports = class Network {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
this.axios.interceptors.response.use((response) => {
|
|
70
|
-
logger.info(`Finish Request:
|
|
70
|
+
logger.info(`Finish Request: ${response.config.method.toUpperCase()} ${response.config.url}`, getHttpRequestObject(response));
|
|
71
71
|
return response;
|
|
72
72
|
}, (error) => {
|
|
73
73
|
logger.error('Finish Request with error', { data: error.response ? error.response.data : undefined, ...getHttpRequestObject(error.response || error) });
|
|
74
|
-
// throw error;
|
|
75
74
|
return error;
|
|
76
75
|
});
|
|
77
76
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/node-common",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.59",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"coverage": "jest --coverage --forceExit --runInBand",
|
|
7
|
-
"test": "jest --forceExit --runInBand",
|
|
6
|
+
"coverage": "jest --coverage --forceExit --runInBand --detectLeaks",
|
|
7
|
+
"test": "jest --forceExit --runInBand --detectLeaks",
|
|
8
8
|
"test-auto": "jest --watch --runInBand",
|
|
9
9
|
"linter": "./node_modules/.bin/eslint ."
|
|
10
10
|
},
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"portfinder": "^1.0.13",
|
|
37
37
|
"qs": "^6.5.2",
|
|
38
38
|
"timekeeper": "^2.1.2",
|
|
39
|
+
"weak": "^1.0.1",
|
|
39
40
|
"winston": "^3.0.0",
|
|
40
41
|
"ws": "^5.2.1"
|
|
41
42
|
},
|
|
@@ -44,6 +45,6 @@
|
|
|
44
45
|
"eslint-config-airbnb": "^16.1.0",
|
|
45
46
|
"eslint-plugin-import": "^2.11.0",
|
|
46
47
|
"jest-extended": "^0.7.1",
|
|
47
|
-
"nock": "^
|
|
48
|
+
"nock": "^10.0.2"
|
|
48
49
|
}
|
|
49
50
|
}
|