From 207c0dba1af9d929fb076b5bd60253adc778c98a Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Thu, 22 Feb 2024 08:34:29 +0100 Subject: [PATCH] refactor: break circular dependency (2) --- lib/in-memory-adapter.ts | 11 ----------- lib/index.ts | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 lib/index.ts diff --git a/lib/in-memory-adapter.ts b/lib/in-memory-adapter.ts index acb4248..83d4d67 100644 --- a/lib/in-memory-adapter.ts +++ b/lib/in-memory-adapter.ts @@ -505,14 +505,3 @@ function shouldIncludePacket( const notExcluded = sessionRooms.every((room) => !opts.except.has(room)); return included && notExcluded; } - -export { - ClusterAdapter, - ClusterAdapterWithHeartbeat, - ClusterAdapterOptions, - ClusterMessage, - ClusterResponse, - MessageType, - ServerId, - Offset, -} from "./cluster-adapter"; diff --git a/lib/index.ts b/lib/index.ts new file mode 100644 index 0000000..2665139 --- /dev/null +++ b/lib/index.ts @@ -0,0 +1,21 @@ +export { + SocketId, + PrivateSessionId, + Room, + BroadcastFlags, + BroadcastOptions, + Session, + Adapter, + SessionAwareAdapter, +} from "./in-memory-adapter"; + +export { + ClusterAdapter, + ClusterAdapterWithHeartbeat, + ClusterAdapterOptions, + ClusterMessage, + ClusterResponse, + MessageType, + ServerId, + Offset, +} from "./cluster-adapter";