From 9229757bdccdac6afd73004bad1098d265598d08 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 24 Oct 2024 11:29:57 +0100 Subject: [PATCH 1/2] chore: fix typo in HTTPGatewayRouter class name Gatway -> Gateway --- packages/routers/src/http-gateway-routing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/routers/src/http-gateway-routing.ts b/packages/routers/src/http-gateway-routing.ts index ae2e30da..0f96a8f6 100644 --- a/packages/routers/src/http-gateway-routing.ts +++ b/packages/routers/src/http-gateway-routing.ts @@ -33,7 +33,7 @@ function toPeerInfo (url: string | URL): PeerInfo { } } -class HTTPGatwayRouter implements Partial { +class HTTPGatewayRouter implements Partial { private readonly gateways: PeerInfo[] constructor (init: HTTPGatwayRouterInit = {}) { @@ -52,5 +52,5 @@ class HTTPGatwayRouter implements Partial { * Returns a static list of HTTP Gateways as providers */ export function httpGatewayRouting (init: HTTPGatwayRouterInit = {}): Partial { - return new HTTPGatwayRouter(init) + return new HTTPGatewayRouter(init) } From 77894333c47ef0f0c5d7afce5c1da89bd6a27d57 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Mon, 13 Jan 2025 19:00:29 +0100 Subject: [PATCH 2/2] chore: update interface name --- packages/routers/src/http-gateway-routing.ts | 6 +++--- packages/routers/src/index.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/routers/src/http-gateway-routing.ts b/packages/routers/src/http-gateway-routing.ts index 0f96a8f6..5a40c2f7 100644 --- a/packages/routers/src/http-gateway-routing.ts +++ b/packages/routers/src/http-gateway-routing.ts @@ -15,7 +15,7 @@ export const DEFAULT_TRUSTLESS_GATEWAYS = [ 'https://4everland.io' ] -export interface HTTPGatwayRouterInit { +export interface HTTPGatewayRouterInit { gateways?: Array } @@ -36,7 +36,7 @@ function toPeerInfo (url: string | URL): PeerInfo { class HTTPGatewayRouter implements Partial { private readonly gateways: PeerInfo[] - constructor (init: HTTPGatwayRouterInit = {}) { + constructor (init: HTTPGatewayRouterInit = {}) { this.gateways = (init.gateways ?? DEFAULT_TRUSTLESS_GATEWAYS).map(url => toPeerInfo(url)) } @@ -51,6 +51,6 @@ class HTTPGatewayRouter implements Partial { /** * Returns a static list of HTTP Gateways as providers */ -export function httpGatewayRouting (init: HTTPGatwayRouterInit = {}): Partial { +export function httpGatewayRouting (init: HTTPGatewayRouterInit = {}): Partial { return new HTTPGatewayRouter(init) } diff --git a/packages/routers/src/index.ts b/packages/routers/src/index.ts index c4f7b7c7..e3b51a22 100644 --- a/packages/routers/src/index.ts +++ b/packages/routers/src/index.ts @@ -6,5 +6,5 @@ export { delegatedHTTPRouting } from './delegated-http-routing.js' export { delegatedHTTPRoutingDefaults } from './utils/delegated-http-routing-defaults.js' export { httpGatewayRouting } from './http-gateway-routing.js' -export type { HTTPGatwayRouterInit } from './http-gateway-routing.js' +export type { HTTPGatewayRouterInit } from './http-gateway-routing.js' export { libp2pRouting } from './libp2p-routing.js'