diff --git a/package.json b/package.json index dd0f6c5..dc3853e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "test": "mocha --require ts-node/register --extension ts ./src --recursive", "test:watch": "mocha --require ts-node/register --extension ts ./src --recursive --watch", - "lint": "eslint ./src/**/*.{ts,js}", + "lint": "eslint ./src/**/*.ts", "build": "rm -rf dist && tsc --project ./tsconfig.json", "release": "CI=true semantic-release" }, @@ -29,8 +29,8 @@ "node": ">=14.0.0" }, "dependencies": { - "@emartech/json-logger": "6.0.0", - "axios": "0.27.2", + "@emartech/json-logger": "7.2.3", + "axios": "1.1.3", "escher-auth": "3.2.4" }, "devDependencies": { @@ -40,15 +40,15 @@ "@types/node": "18.7.23", "@types/sinon": "10.0.13", "@types/sinon-chai": "3.2.8", - "@typescript-eslint/parser": "5.35.1", + "@typescript-eslint/parser": "5.40.1", "chai": "4.3.6", "chai-subset": "1.6.0", - "eslint": "7.21.0", + "eslint": "8.25.0", "eslint-config-emarsys": "5.1.0", - "eslint-plugin-no-only-tests": "2.4.0", - "eslint-plugin-security": "1.4.0", + "eslint-plugin-no-only-tests": "3.0.0", + "eslint-plugin-security": "1.5.0", "mocha": "10.0.0", - "semantic-release": "17.4.7", + "semantic-release": "19.0.5", "sinon": "14.0.0", "sinon-chai": "3.7.0", "ts-node": "10.9.1", diff --git a/src/wrapper.ts b/src/wrapper.ts index c9cd7b5..bca183d 100644 --- a/src/wrapper.ts +++ b/src/wrapper.ts @@ -1,6 +1,13 @@ import { EscherRequestError } from './requestError'; import { RequestOptions } from './requestOption'; -import { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosResponseHeaders, CancelTokenSource } from 'axios'; +import { + AxiosError, + AxiosRequestConfig, + AxiosResponse, + AxiosResponseHeaders, + CancelTokenSource, + RawAxiosResponseHeaders +} from 'axios'; import { Agent as HttpAgent } from 'http'; import { Agent as HttpsAgent } from 'https'; import axios from 'axios'; @@ -20,7 +27,7 @@ export interface TransformedResponse { body: T, statusCode: number; statusMessage: string; - headers: AxiosResponseHeaders + headers: RawAxiosResponseHeaders | AxiosResponseHeaders } export class RequestWrapper {