From afefef1c40a18e4407251779e8e44a6e81469e41 Mon Sep 17 00:00:00 2001 From: Francisco Buceta Date: Tue, 9 Nov 2021 00:06:43 +0100 Subject: [PATCH] fix: force type of header Signed-off-by: Francisco Buceta --- extensions/authentication-jwt/package-lock.json | 9 +++++++++ packages/http-caching-proxy/src/http-caching-proxy.ts | 4 ++-- packages/model-api-builder/package-lock.json | 6 ------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/extensions/authentication-jwt/package-lock.json b/extensions/authentication-jwt/package-lock.json index 5669f49ccfd5..102c95540a3b 100644 --- a/extensions/authentication-jwt/package-lock.json +++ b/extensions/authentication-jwt/package-lock.json @@ -238,6 +238,7 @@ "license": "MIT", "peer": true, "dependencies": { + "@loopback/http-server": "^2.5.4", "@types/body-parser": "^1.19.1", "@types/express": "^4.17.13", "@types/express-serve-static-core": "^4.17.24", @@ -251,10 +252,14 @@ "tslib": "^2.3.1" }, "devDependencies": { + "@loopback/build": "^7.0.2", + "@loopback/core": "^2.18.0", + "@loopback/testlab": "^3.4.4", "@types/debug": "^4.1.7", "@types/node": "^10.17.60", "@types/on-finished": "^2.3.1", "@types/toposort": "^2.0.3", + "http-errors": "^1.8.0", "source-map-support": "^0.5.20", "typescript": "~4.4.4" }, @@ -1979,6 +1984,10 @@ "@loopback/express": { "version": "file:../../packages/express", "requires": { + "@loopback/build": "^7.0.2", + "@loopback/core": "^2.18.0", + "@loopback/http-server": "^2.5.4", + "@loopback/testlab": "^3.4.4", "@types/body-parser": "^1.19.1", "@types/debug": "^4.1.7", "@types/express": "^4.17.13", diff --git a/packages/http-caching-proxy/src/http-caching-proxy.ts b/packages/http-caching-proxy/src/http-caching-proxy.ts index c85449f02f6a..121d8c2e10d1 100644 --- a/packages/http-caching-proxy/src/http-caching-proxy.ts +++ b/packages/http-caching-proxy/src/http-caching-proxy.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import axios, {AxiosInstance, Method} from 'axios'; +import axios, {AxiosInstance, AxiosRequestHeaders, Method} from 'axios'; import debugFactory from 'debug'; import {once} from 'events'; import { @@ -200,7 +200,7 @@ export class HttpCachingProxy { const backendResponse = await this._axios({ method: clientRequest.method as Method, url: clientRequest.url!, - headers: clientRequest.headers, + headers: clientRequest.headers as AxiosRequestHeaders, data: clientRequest, // Set the response type to `arraybuffer` to force the `data` to be a // Buffer to allow ease of caching diff --git a/packages/model-api-builder/package-lock.json b/packages/model-api-builder/package-lock.json index 64c18bd8c6ed..590eceb41f20 100644 --- a/packages/model-api-builder/package-lock.json +++ b/packages/model-api-builder/package-lock.json @@ -192,9 +192,6 @@ "tslib": "^2.3.1" }, "devDependencies": { - "@loopback/build": "^7.0.2", - "@loopback/eslint-config": "^11.0.2", - "@loopback/testlab": "^3.4.4", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.176", "@types/node": "^10.17.60" @@ -1452,9 +1449,6 @@ "@loopback/metadata": { "version": "file:../metadata", "requires": { - "@loopback/build": "^7.0.2", - "@loopback/eslint-config": "^11.0.2", - "@loopback/testlab": "^3.4.4", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.176", "@types/node": "^10.17.60",