Skip to content

Commit

Permalink
fix gateway config
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelManke committed Jun 11, 2021
1 parent 8efbdd6 commit 1d2f2ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -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<GatewayConfiguration> }).gatewayConfigs = {
HTTP: {
configure: () => ({ agent }),
},
}
}
return forge(manifest)
Expand Down

0 comments on commit 1d2f2ed

Please sign in to comment.