feat: `waitForRemotePeer` can now be directly imported from `@waku/core`

This commit is contained in:
fryorcraken.eth 2022-12-02 16:38:30 +11:00
parent f7fabec8b3
commit 33ed43c068
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
12 changed files with 35 additions and 24 deletions

View File

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `@multiformats/multiaddr` as peer dependency. - Add `@multiformats/multiaddr` as peer dependency.
### Changed
- `waitForRemotePeer` can now be directly imported from `@waku/core`.
## @waku/core [0.0.6](https://github.com/waku-org/js-waku/compare/@waku/core@0.0.5...@waku/core@0.0.6) (2022-11-18) ## @waku/core [0.0.6](https://github.com/waku-org/js-waku/compare/@waku/core@0.0.5...@waku/core@0.0.6) (2022-11-18)
### Added ### Added

View File

@ -13,10 +13,6 @@
"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/wait_for_remote_peer": {
"types": "./dist/lib/wait_for_remote_peer.d.ts",
"import": "./dist/lib/wait_for_remote_peer.js"
},
"./lib/waku_message/version_0": { "./lib/waku_message/version_0": {
"types": "./dist/lib/waku_message/version_0.d.ts", "types": "./dist/lib/waku_message/version_0.d.ts",
"import": "./dist/lib/waku_message/version_0.js" "import": "./dist/lib/waku_message/version_0.js"

View File

@ -1,12 +1,11 @@
import { nodeResolve } from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs"; import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json"; import json from "@rollup/plugin-json";
import { nodeResolve } from "@rollup/plugin-node-resolve";
export default { 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/wait_for_remote_peer": "dist/lib/wait_for_remote_peer.js",
"lib/waku_message/version_0": "dist/lib/waku_message/version_0.js", "lib/waku_message/version_0": "dist/lib/waku_message/version_0.js",
"lib/waku_message/topic_only_message": "lib/waku_message/topic_only_message":
"dist/lib/waku_message/topic_only_message.js", "dist/lib/waku_message/topic_only_message.js",

View File

@ -33,3 +33,5 @@ export {
StoreCodec, StoreCodec,
createCursor, createCursor,
} from "./lib/waku_store/index.js"; } from "./lib/waku_store/index.js";
export { waitForRemotePeer } from "./lib/wait_for_remote_peer.js";

View File

@ -1,4 +1,4 @@
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { waitForRemotePeer } from "@waku/core";
import { createPrivacyNode } from "@waku/create"; import { createPrivacyNode } from "@waku/create";
import { ENR } from "@waku/enr"; import { ENR } from "@waku/enr";
import type { WakuPrivacy } from "@waku/interfaces"; import type { WakuPrivacy } from "@waku/interfaces";

View File

@ -1,8 +1,13 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { createDecoder, createEncoder, DecodedMessage } from "@waku/core"; import {
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; createDecoder,
createEncoder,
DecodedMessage,
waitForRemotePeer,
} from "@waku/core";
import { createLightNode } from "@waku/create"; import { createLightNode } from "@waku/create";
import { Protocols, WakuLight } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";
import type { WakuLight } from "@waku/interfaces";
import { import {
createDecoder as eciesDecoder, createDecoder as eciesDecoder,
createEncoder as eciesEncoder, createEncoder as eciesEncoder,

View File

@ -1,6 +1,5 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { createDecoder, createEncoder } from "@waku/core"; import { createDecoder, createEncoder, waitForRemotePeer } from "@waku/core";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { createLightNode } from "@waku/create"; import { createLightNode } from "@waku/create";
import type { DecodedMessage, WakuLight } from "@waku/interfaces"; import type { DecodedMessage, WakuLight } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";

View File

@ -1,6 +1,5 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { createEncoder } from "@waku/core"; import { createEncoder, waitForRemotePeer } from "@waku/core";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { createLightNode } from "@waku/create"; import { createLightNode } from "@waku/create";
import type { WakuLight } from "@waku/interfaces"; import type { WakuLight } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";

View File

@ -1,8 +1,12 @@
import { PeerId } from "@libp2p/interface-peer-id"; import { PeerId } from "@libp2p/interface-peer-id";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { DefaultPubSubTopic } from "@waku/core"; import {
import { createDecoder, createEncoder, DecodedMessage } from "@waku/core"; createDecoder,
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; createEncoder,
DecodedMessage,
DefaultPubSubTopic,
waitForRemotePeer,
} from "@waku/core";
import { createPrivacyNode } from "@waku/create"; import { createPrivacyNode } from "@waku/create";
import type { WakuPrivacy } from "@waku/interfaces"; import type { WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";

View File

@ -1,9 +1,13 @@
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { createCursor, PageDirection } from "@waku/core"; import {
import { createDecoder, createEncoder } from "@waku/core"; createCursor,
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; createDecoder,
createEncoder,
PageDirection,
waitForRemotePeer,
} from "@waku/core";
import { createLightNode } from "@waku/create"; import { createLightNode } from "@waku/create";
import { DecodedMessage, Message, WakuLight } from "@waku/interfaces"; import type { DecodedMessage, Message, WakuLight } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";
import { import {
createDecoder as createEciesDecoder, createDecoder as createEciesDecoder,

View File

@ -1,4 +1,4 @@
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { waitForRemotePeer } from "@waku/core";
import { createLightNode, createPrivacyNode } from "@waku/create"; import { createLightNode, createPrivacyNode } from "@waku/create";
import type { WakuLight, WakuPrivacy } from "@waku/interfaces"; import type { WakuLight, WakuPrivacy } from "@waku/interfaces";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";

View File

@ -1,8 +1,7 @@
import { bootstrap } from "@libp2p/bootstrap"; import { bootstrap } from "@libp2p/bootstrap";
import type { PeerId } from "@libp2p/interface-peer-id"; import type { PeerId } from "@libp2p/interface-peer-id";
import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils";
import { DefaultUserAgent } from "@waku/core"; import { DefaultUserAgent, waitForRemotePeer } from "@waku/core";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
import { createLightNode, createPrivacyNode } from "@waku/create"; import { createLightNode, createPrivacyNode } from "@waku/create";
import type { import type {
DecodedMessage, DecodedMessage,