From 0bd895b3b13b0a7c929534dc24d302de79d04679 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Fri, 13 Sep 2024 14:11:03 +0530 Subject: [PATCH] chore: restructre dirs --- .../sdk/src/protocols/{receiver => }/filter/constants.ts | 0 packages/sdk/src/protocols/{receiver => }/filter/index.ts | 2 +- .../{receiver => }/filter/subscription_manager.ts | 4 ++-- packages/sdk/src/protocols/{sender => }/lightpush/index.ts | 2 +- packages/sdk/src/protocols/{receiver => }/store/index.ts | 0 .../index.ts} | 4 ++-- .../receiver.ts} | 0 .../sender.ts} | 0 packages/sdk/src/waku.ts | 7 +++---- 9 files changed, 9 insertions(+), 10 deletions(-) rename packages/sdk/src/protocols/{receiver => }/filter/constants.ts (100%) rename packages/sdk/src/protocols/{receiver => }/filter/index.ts (99%) rename packages/sdk/src/protocols/{receiver => }/filter/subscription_manager.ts (99%) rename packages/sdk/src/protocols/{sender => }/lightpush/index.ts (98%) rename packages/sdk/src/protocols/{receiver => }/store/index.ts (100%) rename packages/sdk/src/{protocols/reliability_monitor_manager.ts => reliability_monitor/index.ts} (92%) rename packages/sdk/src/{protocols/receiver/reliability_monitor.ts => reliability_monitor/receiver.ts} (100%) rename packages/sdk/src/{protocols/sender/reliability_monitor.ts => reliability_monitor/sender.ts} (100%) diff --git a/packages/sdk/src/protocols/receiver/filter/constants.ts b/packages/sdk/src/protocols/filter/constants.ts similarity index 100% rename from packages/sdk/src/protocols/receiver/filter/constants.ts rename to packages/sdk/src/protocols/filter/constants.ts diff --git a/packages/sdk/src/protocols/receiver/filter/index.ts b/packages/sdk/src/protocols/filter/index.ts similarity index 99% rename from packages/sdk/src/protocols/receiver/filter/index.ts rename to packages/sdk/src/protocols/filter/index.ts index 90d26156e1..c8840ea0e4 100644 --- a/packages/sdk/src/protocols/receiver/filter/index.ts +++ b/packages/sdk/src/protocols/filter/index.ts @@ -24,7 +24,7 @@ import { toAsyncIterator } from "@waku/utils"; -import { BaseProtocolSDK } from "../../base_protocol.js"; +import { BaseProtocolSDK } from "../base_protocol.js"; import { DEFAULT_SUBSCRIBE_OPTIONS } from "./constants.js"; import { SubscriptionManager } from "./subscription_manager.js"; diff --git a/packages/sdk/src/protocols/receiver/filter/subscription_manager.ts b/packages/sdk/src/protocols/filter/subscription_manager.ts similarity index 99% rename from packages/sdk/src/protocols/receiver/filter/subscription_manager.ts rename to packages/sdk/src/protocols/filter/subscription_manager.ts index 554973908b..2c6a87e5ee 100644 --- a/packages/sdk/src/protocols/receiver/filter/subscription_manager.ts +++ b/packages/sdk/src/protocols/filter/subscription_manager.ts @@ -20,8 +20,8 @@ import { import { WakuMessage } from "@waku/proto"; import { groupByContentTopic, Logger } from "@waku/utils"; -import { ReliabilityMonitorManager } from "../../reliability_monitor_manager.js"; -import { ReceiverReliabilityMonitor } from "../reliability_monitor.js"; +import { ReliabilityMonitorManager } from "../../reliability_monitor/index.js"; +import { ReceiverReliabilityMonitor } from "../../reliability_monitor/receiver.js"; import { DEFAULT_KEEP_ALIVE, DEFAULT_SUBSCRIBE_OPTIONS } from "./constants.js"; diff --git a/packages/sdk/src/protocols/sender/lightpush/index.ts b/packages/sdk/src/protocols/lightpush/index.ts similarity index 98% rename from packages/sdk/src/protocols/sender/lightpush/index.ts rename to packages/sdk/src/protocols/lightpush/index.ts index 32abc07e97..8edabfc5c2 100644 --- a/packages/sdk/src/protocols/sender/lightpush/index.ts +++ b/packages/sdk/src/protocols/lightpush/index.ts @@ -15,7 +15,7 @@ import { ensurePubsubTopicIsConfigured, Logger } from "@waku/utils"; import { BaseProtocolSDK } from "../../base_protocol"; import { ReliabilityMonitorManager } from "../../reliability_monitor_manager"; -import { SenderReliabilityMonitor } from "../reliability_monitor"; +import { SenderReliabilityMonitor } from "../sender_reliability_monitor"; const log = new Logger("sdk:light-push"); diff --git a/packages/sdk/src/protocols/receiver/store/index.ts b/packages/sdk/src/protocols/store/index.ts similarity index 100% rename from packages/sdk/src/protocols/receiver/store/index.ts rename to packages/sdk/src/protocols/store/index.ts diff --git a/packages/sdk/src/protocols/reliability_monitor_manager.ts b/packages/sdk/src/reliability_monitor/index.ts similarity index 92% rename from packages/sdk/src/protocols/reliability_monitor_manager.ts rename to packages/sdk/src/reliability_monitor/index.ts index 16619b36f0..d4f501d308 100644 --- a/packages/sdk/src/protocols/reliability_monitor_manager.ts +++ b/packages/sdk/src/reliability_monitor/index.ts @@ -5,8 +5,8 @@ import { PubsubTopic } from "@waku/interfaces"; -import { ReceiverReliabilityMonitor } from "./receiver/reliability_monitor"; -import { SenderReliabilityMonitor } from "./sender/reliability_monitor"; +import { ReceiverReliabilityMonitor } from "./receiver"; +import { SenderReliabilityMonitor } from "./sender"; export class ReliabilityMonitorManager { private static receiverMonitors: Map< diff --git a/packages/sdk/src/protocols/receiver/reliability_monitor.ts b/packages/sdk/src/reliability_monitor/receiver.ts similarity index 100% rename from packages/sdk/src/protocols/receiver/reliability_monitor.ts rename to packages/sdk/src/reliability_monitor/receiver.ts diff --git a/packages/sdk/src/protocols/sender/reliability_monitor.ts b/packages/sdk/src/reliability_monitor/sender.ts similarity index 100% rename from packages/sdk/src/protocols/sender/reliability_monitor.ts rename to packages/sdk/src/reliability_monitor/sender.ts diff --git a/packages/sdk/src/waku.ts b/packages/sdk/src/waku.ts index 7502dab9e6..8150d9b37a 100644 --- a/packages/sdk/src/waku.ts +++ b/packages/sdk/src/waku.ts @@ -16,10 +16,9 @@ import type { import { Protocols } from "@waku/interfaces"; import { Logger } from "@waku/utils"; -import { wakuFilter } from "./protocols/receiver/filter/index.js"; -import { wakuStore } from "./protocols/receiver/store/index.js"; -import { ReliabilityMonitorManager } from "./protocols/reliability_monitor_manager.js"; -import { wakuLightPush } from "./protocols/sender/lightpush/index.js"; +import { ReliabilityMonitorManager } from "./reliability_monitor"; + +import { wakuFilter, wakuLightPush, wakuStore } from "."; export const DefaultPingKeepAliveValueSecs = 5 * 60; export const DefaultRelayKeepAliveValueSecs = 5 * 60;