refactor: remove `waku_` from module names

This is redundant with the context (waku package).
This commit is contained in:
fryorcraken.eth 2022-12-06 12:49:02 +11:00
parent 53af8994bd
commit 574f3ee80f
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
19 changed files with 30 additions and 40 deletions

View File

@ -13,13 +13,13 @@
"types": "./dist/lib/predefined_bootstrap_nodes.d.ts", "types": "./dist/lib/predefined_bootstrap_nodes.d.ts",
"import": "./dist/lib/predefined_bootstrap_nodes.js" "import": "./dist/lib/predefined_bootstrap_nodes.js"
}, },
"./lib/waku_message/version_0": { "./lib/message/version_0": {
"types": "./dist/lib/waku_message/version_0.d.ts", "types": "./dist/lib/message/version_0.d.ts",
"import": "./dist/lib/waku_message/version_0.js" "import": "./dist/lib/message/version_0.js"
}, },
"./lib/waku_message/topic_only_message": { "./lib/message/topic_only_message": {
"types": "./dist/lib/waku_message/topic_only_message.d.ts", "types": "./dist/lib/message/topic_only_message.d.ts",
"import": "./dist/lib/waku_message/topic_only_message.js" "import": "./dist/lib/message/topic_only_message.js"
} }
}, },
"typesVersions": { "typesVersions": {

View File

@ -6,9 +6,8 @@ export default {
input: { input: {
index: "dist/index.js", index: "dist/index.js",
"lib/predefined_bootstrap_nodes": "dist/lib/predefined_bootstrap_nodes.js", "lib/predefined_bootstrap_nodes": "dist/lib/predefined_bootstrap_nodes.js",
"lib/waku_message/version_0": "dist/lib/waku_message/version_0.js", "lib/message/version_0": "dist/lib/message/version_0.js",
"lib/waku_message/topic_only_message": "lib/message/topic_only_message": "dist/lib/message/topic_only_message.js",
"dist/lib/waku_message/topic_only_message.js",
}, },
output: { output: {
dir: "bundle", dir: "bundle",

View File

@ -5,30 +5,30 @@ export {
createEncoder, createEncoder,
createDecoder, createDecoder,
DecodedMessage, DecodedMessage,
} from "./lib/waku_message/version_0.js"; } from "./lib/message/version_0.js";
export * as waku from "./lib/waku.js"; export * as waku from "./lib/waku.js";
export { WakuNode } from "./lib/waku.js"; export { WakuNode } from "./lib/waku.js";
export * as waku_filter from "./lib/waku_filter/index.js"; export * as waku_filter from "./lib/filter/index.js";
export { wakuFilter } from "./lib/waku_filter/index.js"; export { wakuFilter } from "./lib/filter/index.js";
export * as waku_light_push from "./lib/waku_light_push/index.js"; export * as waku_light_push from "./lib/light_push/index.js";
export { export {
wakuLightPush, wakuLightPush,
LightPushCodec, LightPushCodec,
PushResponse, PushResponse,
} from "./lib/waku_light_push/index.js"; } from "./lib/light_push/index.js";
export * as waku_relay from "./lib/waku_relay/index.js"; export * as waku_relay from "./lib/relay/index.js";
export { wakuRelay } from "./lib/waku_relay/index.js"; export { wakuRelay } from "./lib/relay/index.js";
export * as waku_store from "./lib/waku_store/index.js"; export * as waku_store from "./lib/store/index.js";
export { export {
PageDirection, PageDirection,
wakuStore, wakuStore,
StoreCodec, StoreCodec,
createCursor, createCursor,
} from "./lib/waku_store/index.js"; } from "./lib/store/index.js";
export { waitForRemotePeer } from "./lib/wait_for_remote_peer.js"; export { waitForRemotePeer } from "./lib/wait_for_remote_peer.js";

View File

@ -18,8 +18,8 @@ import { IDecodedMessage } from "@waku/interfaces";
import debug from "debug"; import debug from "debug";
import { DefaultPubSubTopic } from "../constants.js"; import { DefaultPubSubTopic } from "../constants.js";
import { TopicOnlyDecoder } from "../message/topic_only_message.js";
import { pushOrInitMapSet } from "../push_or_init_map.js"; import { pushOrInitMapSet } from "../push_or_init_map.js";
import { TopicOnlyDecoder } from "../waku_message/topic_only_message.js";
import * as constants from "./constants.js"; import * as constants from "./constants.js";

View File

@ -5,9 +5,9 @@ import { PeerExchangeCodec } from "@waku/peer-exchange";
import debug from "debug"; import debug from "debug";
import { pEvent } from "p-event"; import { pEvent } from "p-event";
import { FilterCodec } from "./waku_filter/index.js"; import { FilterCodec } from "./filter/index.js";
import { LightPushCodec } from "./waku_light_push/index.js"; import { LightPushCodec } from "./light_push/index.js";
import { StoreCodec } from "./waku_store/index.js"; import { StoreCodec } from "./store/index.js";
const log = debug("waku:wait-for-remote-peer"); const log = debug("waku:wait-for-remote-peer");

View File

@ -16,15 +16,12 @@ import { PeerExchangeCodec } from "@waku/peer-exchange";
import debug from "debug"; import debug from "debug";
import type { Libp2p } from "libp2p"; import type { Libp2p } from "libp2p";
import { FilterCodec, FilterComponents } from "./waku_filter/index.js"; import { FilterCodec, FilterComponents } from "./filter/index.js";
import { import { LightPushCodec, LightPushComponents } from "./light_push/index.js";
LightPushCodec, import { createEncoder } from "./message/version_0.js";
LightPushComponents, import * as relayConstants from "./relay/constants.js";
} from "./waku_light_push/index.js"; import { RelayCodecs, RelayPingContentTopic } from "./relay/constants.js";
import { createEncoder } from "./waku_message/version_0.js"; import { StoreCodec, StoreComponents } from "./store/index.js";
import * as relayConstants from "./waku_relay/constants.js";
import { RelayCodecs, RelayPingContentTopic } from "./waku_relay/constants.js";
import { StoreCodec, StoreComponents } from "./waku_store/index.js";
export const DefaultPingKeepAliveValueSecs = 0; export const DefaultPingKeepAliveValueSecs = 0;
export const DefaultRelayKeepAliveValueSecs = 5 * 60; export const DefaultRelayKeepAliveValueSecs = 5 * 60;

View File

@ -1,7 +1,4 @@
import { import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0";
Decoder as DecoderV0,
proto,
} from "@waku/core/lib/waku_message/version_0";
import type { import type {
IDecoder, IDecoder,
IEncoder, IEncoder,

View File

@ -1,7 +1,7 @@
import { import {
DecodedMessage as DecodedMessageV0, DecodedMessage as DecodedMessageV0,
proto, proto,
} from "@waku/core/lib/waku_message/version_0"; } from "@waku/core/lib/message/version_0";
import type { IDecodedMessage } from "@waku/interfaces"; import type { IDecodedMessage } from "@waku/interfaces";
import { import {

View File

@ -1,7 +1,4 @@
import { import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0";
Decoder as DecoderV0,
proto,
} from "@waku/core/lib/waku_message/version_0";
import type { import type {
IDecoder, IDecoder,
IEncoder, IEncoder,