From a99026daad87f0225dc9bf04d45bf854331e0c61 Mon Sep 17 00:00:00 2001 From: Michael Cole Date: Wed, 27 Mar 2024 11:51:37 -0500 Subject: [PATCH] bug(libp2p): Export Components type for use in apps that use libp2p --- packages/libp2p/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/libp2p/src/index.ts b/packages/libp2p/src/index.ts index aeb24cd382..f3839989cb 100644 --- a/packages/libp2p/src/index.ts +++ b/packages/libp2p/src/index.ts @@ -16,7 +16,6 @@ import { createLibp2pNode } from './libp2p.js' import type { AddressManagerInit } from './address-manager/index.js' -import type { Components } from './components.js' import type { ConnectionManagerInit } from './connection-manager/index.js' import type { TransportManagerInit } from './transport-manager.js' import type { Libp2p, ServiceMap, RecursivePartial, ComponentLogger, NodeInfo, ConnectionProtector, ConnectionEncrypter, ConnectionGater, ContentRouting, Metrics, PeerDiscovery, PeerId, PeerRouting, StreamMuxerFactory, Transport, PrivateKey } from '@libp2p/interface' @@ -24,6 +23,8 @@ import type { PersistentPeerStoreInit } from '@libp2p/peer-store' import type { DNS } from '@multiformats/dns' import type { Datastore } from 'interface-datastore' +export type { Components } from './components.js' + export type ServiceFactoryMap = Record> = { [Property in keyof T]: (components: Components) => T[Property] }