From 1d2f2edd87735e0743623e55d698913be44967a9 Mon Sep 17 00:00:00 2001 From: Raphael Manke Date: Fri, 11 Jun 2021 11:12:24 +0200 Subject: [PATCH] fix gateway config --- src/api/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 4802411..87fd65e 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,5 @@ import { Agent } from 'http' -import forge, { Authorization, Client, Options } from 'mappersmith' +import forge, { Authorization, Client, Options, GatewayConfiguration } from 'mappersmith' import RetryMiddleware, { RetryMiddlewareOptions } from 'mappersmith/middleware/retry/v2' import BasicAuthMiddleware from 'mappersmith/middleware/basic-auth' @@ -108,8 +108,10 @@ export default ({ // if an agent was provided, bind the agent to the mappersmith configs if (agent) { // gatewayConfigs is not listed as a type on manifest object in mappersmith - ;(manifest as any).gatewayConfigs = { - configure: () => ({ agent }), + ;((manifest as unknown) as { gatewayConfigs: Partial }).gatewayConfigs = { + HTTP: { + configure: () => ({ agent }), + }, } } return forge(manifest)