Merge pull request #152 from status-im/re-rename

This commit is contained in:
Franck Royer 2021-05-13 20:46:18 +10:00 committed by GitHub
commit 6dbfa3e159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 79 additions and 78 deletions

View File

@ -1,4 +1,4 @@
name: Add new issues to waku-js project board name: Add new issues to js-waku project board
on: on:
issues: issues:
@ -10,6 +10,6 @@ jobs:
steps: steps:
- uses: alex-page/github-project-automation-plus@v0.6.0 - uses: alex-page/github-project-automation-plus@v0.6.0
with: with:
project: waku-js project: js-waku
column: New column: New
repo-token: ${{ secrets.GH_ACTION_PROJECT_MGMT }} repo-token: ${{ secrets.GH_ACTION_PROJECT_MGMT }}

View File

@ -15,7 +15,7 @@ jobs:
- name: Set git author identity - name: Set git author identity
run: | run: |
git config user.name "GitHub Action On waku-js Repo" git config user.name "GitHub Action On js-waku Repo"
git config user.email "franck+ghpages@status.im" git config user.email "franck+ghpages@status.im"
- name: Install NodeJS - name: Install NodeJS
@ -29,10 +29,10 @@ jobs:
path: ~/.npm path: ~/.npm
key: node-v1-${{ hashFiles('**/package-lock.json') }} key: node-v1-${{ hashFiles('**/package-lock.json') }}
- name: "[waku-js] install using npm ci" - name: "[js-waku] install using npm ci"
uses: bahmutov/npm-install@v1 uses: bahmutov/npm-install@v1
- name: "[waku-js] build" - name: "[js-waku] build"
run: npm run build run: npm run build
- name: install using npm i - name: install using npm i

View File

@ -30,10 +30,10 @@ jobs:
path: ~/.npm path: ~/.npm
key: examples-node-v1-${{ hashFiles('**/package-lock.json') }} key: examples-node-v1-${{ hashFiles('**/package-lock.json') }}
- name: "[waku-js] install using npm ci" - name: "[js-waku] install using npm ci"
uses: bahmutov/npm-install@v1 uses: bahmutov/npm-install@v1
- name: "[waku-js] build" - name: "[js-waku] build"
run: npm run build run: npm run build
- name: ${{ matrix.example }} install using npm i - name: ${{ matrix.example }} install using npm i

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Enable passing `string`s to `addPeerToAddressBook`. - Enable passing `string`s to `addPeerToAddressBook`.
- Use `addPeerToAddressBook` in examples and usage doc. - Use `addPeerToAddressBook` in examples and usage doc.
- Settle on `js-waku` name across the board.
## [0.1.0] - 2021-05-12 ## [0.1.0] - 2021-05-12

View File

@ -2,10 +2,10 @@
Contributors are welcomed! Contributors are welcomed!
We try to keep a number of [`good first issue`](https://github.com/status-im/waku-js/labels/good%20first%20issue) for new contributors. We try to keep a number of [`good first issue`](https://github.com/status-im/js-waku/labels/good%20first%20issue) for new contributors.
If you feel confident, you can also check out the [`help wanted`](https://github.com/status-im/waku-js/labels/help%20wanted) issues. If you feel confident, you can also check out the [`help wanted`](https://github.com/status-im/js-waku/labels/help%20wanted) issues.
To have an idea of the work in the pipeline, feel free to view the [waku-js project board](https://github.com/status-im/waku-js/projects/1). To have an idea of the work in the pipeline, feel free to view the [js-waku project board](https://github.com/status-im/js-waku/projects/1).
This project board is to prioritize the work of core contributors so do not be deterred by issues in the `Icebox` or bottom of the `Backlog`. This project board is to prioritize the work of core contributors so do not be deterred by issues in the `Icebox` or bottom of the `Backlog`.
Do note that we have a [CI](./.github/workflows/ci.yml) powered by GitHub Action. Do note that we have a [CI](./.github/workflows/ci.yml) powered by GitHub Action.
@ -25,7 +25,7 @@ To build and test this repository, you need:
To ensure interoperability with [nim-waku](https://github.com/status-im/nim-waku/), some tests are run against a nim-waku node. To ensure interoperability with [nim-waku](https://github.com/status-im/nim-waku/), some tests are run against a nim-waku node.
This is why `nim-waku` is present as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), which itself contain several submodules. This is why `nim-waku` is present as a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), which itself contain several submodules.
At this stage, it is not possible to exclude nim-waku tests, hence `git submodule update --init --recursive` is run before testing (see [`pretest` script](https://github.com/status-im/waku-js/blob/main/package.json)). At this stage, it is not possible to exclude nim-waku tests, hence `git submodule update --init --recursive` is run before testing (see [`pretest` script](https://github.com/status-im/js-waku/blob/main/package.json)).
To build nim-waku, you also need [Rust](https://www.rust-lang.org/tools/install). To build nim-waku, you also need [Rust](https://www.rust-lang.org/tools/install).

View File

@ -1,19 +1,19 @@
# WakuJS # js-waku
A JavaScript implementation of the [Waku v2 protocol](https://rfc.vac.dev/spec/10/). A JavaScript implementation of the [Waku v2 protocol](https://rfc.vac.dev/spec/10/).
## Usage ## Usage
Install `waku-js` package: Install `js-waku` package:
```shell ```shell
npm install waku-js npm install js-waku
``` ```
Start a waku node: Start a waku node:
```javascript ```javascript
import { Waku } from 'waku-js'; import { Waku } from 'js-waku';
const waku = await Waku.create(); const waku = await Waku.create();
``` ```
@ -49,7 +49,7 @@ waku.relay.addObserver((msg) => {
Send a message on the waku relay network: Send a message on the waku relay network:
```javascript ```javascript
import { WakuMessage } from 'waku-js'; import { WakuMessage } from 'js-waku';
const msg = WakuMessage.fromUtf8String("Here is a message!", "waku/2/my-cool-app/proto") const msg = WakuMessage.fromUtf8String("Here is a message!", "waku/2/my-cool-app/proto")
await waku.relay.send(msg); await waku.relay.send(msg);
@ -78,7 +78,7 @@ waku.store.queryHistory(storePeerId, ["waku/2/my-cool-app/proto"],
``` ```
Find more [examples](#examples) below Find more [examples](#examples) below
or checkout the latest `main` branch documentation at [https://status-im.github.io/waku-js/docs/](https://status-im.github.io/waku-js/docs/). or checkout the latest `main` branch documentation at [https://status-im.github.io/js-waku/docs/](https://status-im.github.io/js-waku/docs/).
Docs can also be generated locally using: Docs can also be generated locally using:
@ -89,7 +89,7 @@ npm run doc
## Waku Protocol Support ## Waku Protocol Support
You can track progress on the [project board](https://github.com/status-im/waku-js/projects/1). You can track progress on the [project board](https://github.com/status-im/js-waku/projects/1).
- ✔: Supported - ✔: Supported
- 🚧: Implementation in progress - 🚧: Implementation in progress
@ -113,28 +113,28 @@ You can track progress on the [project board](https://github.com/status-im/waku-
## Bugs, Questions & Features ## Bugs, Questions & Features
If you encounter any bug or would like to propose new features, feel free to [open an issue](https://github.com/status-im/waku-js/issues/new/). If you encounter any bug or would like to propose new features, feel free to [open an issue](https://github.com/status-im/js-waku/issues/new/).
For support, questions & more general topics, please join the discussion on the [Vac forum](https://forum.vac.dev/tag/waku-js) (use _\#js-waku_ tag). For support, questions & more general topics, please join the discussion on the [Vac forum](https://forum.vac.dev/tag/js-waku) (use _\#js-waku_ tag).
## Examples ## Examples
## Web Chat App (ReactJS) ## Web Chat App (ReactJS)
A ReactJS chat app is provided as a showcase of the library used in the browser. A ReactJS chat app is provided as a showcase of the library used in the browser.
A deployed version is available at https://status-im.github.io/waku-js/ A deployed version is available at https://status-im.github.io/js-waku/
Find the code in the [examples folder](https://github.com/status-im/waku-js/tree/main/examples/web-chat). Find the code in the [examples folder](https://github.com/status-im/js-waku/tree/main/examples/web-chat).
To run a development version locally, do: To run a development version locally, do:
```shell ```shell
git clone https://github.com/status-im/waku-js/ ; cd waku-js git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install # Install dependencies for waku-js npm install # Install dependencies for js-waku
npm run build # Build waku-js npm run build # Build js-waku
cd examples/web-chat cd examples/web-chat
npm install # Install dependencies for the web app npm install # Install dependencies for the web app
npm run start # Start development server to serve the web app on http://localhost:3000/waku-js npm run start # Start development server to serve the web app on http://localhost:3000/js-waku
``` ```
Use `/help` to see the available commands. Use `/help` to see the available commands.
@ -144,7 +144,7 @@ Use `/help` to see the available commands.
A node chat app is provided as a working example of the library. A node chat app is provided as a working example of the library.
It is interoperable with the [nim-waku chat app example](https://github.com/status-im/nim-waku/blob/master/examples/v2/chat2.nim). It is interoperable with the [nim-waku chat app example](https://github.com/status-im/nim-waku/blob/master/examples/v2/chat2.nim).
Find the code in the [examples folder](https://github.com/status-im/waku-js/tree/main/examples/cli-chat). Find the code in the [examples folder](https://github.com/status-im/js-waku/tree/main/examples/cli-chat).
To run the chat app, first ensure you have [Node.js](https://nodejs.org/en/) v14 or above: To run the chat app, first ensure you have [Node.js](https://nodejs.org/en/) v14 or above:
@ -155,9 +155,9 @@ node --version
Then, install and run: Then, install and run:
```shell ```shell
git clone https://github.com/status-im/waku-js/ ; cd waku-js git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install # Install dependencies for waku-js npm install # Install dependencies for js-waku
npm run build # Build waku-js npm run build # Build js-waku
cd examples/cli-chat cd examples/cli-chat
npm install # Install dependencies for the cli app npm install # Install dependencies for the cli app
npm run start -- --staticNode /ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ npm run start -- --staticNode /ip4/134.209.139.210/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ

View File

@ -1,3 +1,3 @@
# A NodeJS CLI Chat App powered by waku-js # A NodeJS CLI Chat App powered by js-waku
See waku-js [README](../../README.md#cli-chat-app-nodejs) for details. See js-waku [README](../../README.md#cli-chat-app-nodejs) for details.

View File

@ -1,17 +1,17 @@
{ {
"name": "waku-js-cli-chat", "name": "js-waku-cli-chat",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "waku-js-cli-chat", "name": "js-waku-cli-chat",
"version": "0.1.0", "version": "0.1.0",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"dependencies": { "dependencies": {
"js-waku": "../../build/main",
"libp2p-tcp": "^0.15.4", "libp2p-tcp": "^0.15.4",
"prompt-sync": "^4.2.0", "prompt-sync": "^4.2.0"
"waku-js": "../../build/main"
}, },
"devDependencies": { "devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1", "@istanbuljs/nyc-config-typescript": "^1.0.1",
@ -4437,6 +4437,10 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true "dev": true
}, },
"node_modules/js-waku": {
"resolved": "../../build/main",
"link": true
},
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@ -7509,10 +7513,6 @@
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==", "integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==",
"dev": true "dev": true
}, },
"node_modules/waku-js": {
"resolved": "../../build/main",
"link": true
},
"node_modules/which": { "node_modules/which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@ -11205,6 +11205,9 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true "dev": true
}, },
"js-waku": {
"version": "file:../../build/main"
},
"js-yaml": { "js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@ -13563,9 +13566,6 @@
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==", "integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==",
"dev": true "dev": true
}, },
"waku-js": {
"version": "file:../../build/main"
},
"which": { "which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",

View File

@ -1,9 +1,9 @@
{ {
"name": "waku-js-cli-chat", "name": "js-waku-cli-chat",
"version": "0.1.0", "version": "0.1.0",
"description": "A NodeJS CLI Chat App powered by waku-js", "description": "A NodeJS CLI Chat App powered by js-waku",
"main": "./index.ts", "main": "./index.ts",
"repository": "https://github.com/status-im/waku-js", "repository": "https://github.com/status-im/js-waku",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"keywords": [ "keywords": [
"waku", "waku",
@ -31,9 +31,9 @@
"node": ">=14" "node": ">=14"
}, },
"dependencies": { "dependencies": {
"js-waku": "../../build/main",
"libp2p-tcp": "^0.15.4", "libp2p-tcp": "^0.15.4",
"prompt-sync": "^4.2.0", "prompt-sync": "^4.2.0"
"waku-js": "../../build/main"
}, },
"devDependencies": { "devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1", "@istanbuljs/nyc-config-typescript": "^1.0.1",

View File

@ -1,5 +1,5 @@
import { expect } from 'chai'; import { expect } from 'chai';
import { ChatMessage } from 'waku-js'; import { ChatMessage } from 'js-waku';
import { formatMessage } from './chat'; import { formatMessage } from './chat';

View File

@ -1,9 +1,9 @@
import readline from 'readline'; import readline from 'readline';
import util from 'util'; import util from 'util';
import { ChatMessage, StoreCodec, Waku, WakuMessage } from 'js-waku';
import TCP from 'libp2p-tcp'; import TCP from 'libp2p-tcp';
import { multiaddr, Multiaddr } from 'multiaddr'; import { multiaddr, Multiaddr } from 'multiaddr';
import { ChatMessage, StoreCodec, Waku, WakuMessage } from 'waku-js';
const ChatContentTopic = 'dingpu'; const ChatContentTopic = 'dingpu';
@ -25,7 +25,7 @@ export default async function startChat(): Promise<void> {
output: process.stdout, output: process.stdout,
}); });
let nick = 'waku-js'; let nick = 'js-waku';
try { try {
const question = util.promisify(rl.question).bind(rl); const question = util.promisify(rl.question).bind(rl);
// Looks like wrong type definition of promisify is picked. // Looks like wrong type definition of promisify is picked.

View File

@ -1,3 +1,3 @@
# A React Web Chat App powered by waku-js # A React Web Chat App powered by js-waku
See waku-js [README](../../README.md#web-chat-app-reactjs) for details. See js-waku [README](../../README.md#web-chat-app-reactjs) for details.

View File

@ -8,10 +8,10 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@livechat/ui-kit": "*", "@livechat/ui-kit": "*",
"js-waku": "../../build/main",
"react": "^16.14.0", "react": "^16.14.0",
"react-dom": "^16.14.0", "react-dom": "^16.14.0",
"server-name-generator": "^1.0.5", "server-name-generator": "^1.0.5",
"waku-js": "../../build/main",
"web-vitals": "^1.1.1" "web-vitals": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
@ -14537,6 +14537,10 @@
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
}, },
"node_modules/js-waku": {
"resolved": "../../build/main",
"link": true
},
"node_modules/js-yaml": { "node_modules/js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@ -22885,10 +22889,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/waku-js": {
"resolved": "../../build/main",
"link": true
},
"node_modules/walker": { "node_modules/walker": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",
@ -36512,6 +36512,9 @@
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
}, },
"js-waku": {
"version": "file:../../build/main"
},
"js-yaml": { "js-yaml": {
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@ -43270,9 +43273,6 @@
"xml-name-validator": "^3.0.0" "xml-name-validator": "^3.0.0"
} }
}, },
"waku-js": {
"version": "file:../../build/main"
},
"walker": { "walker": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",

View File

@ -2,13 +2,13 @@
"name": "web-chat", "name": "web-chat",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "/waku-js", "homepage": "/js-waku",
"dependencies": { "dependencies": {
"@livechat/ui-kit": "*", "@livechat/ui-kit": "*",
"js-waku": "../../build/main",
"react": "^16.14.0", "react": "^16.14.0",
"react-dom": "^16.14.0", "react-dom": "^16.14.0",
"server-name-generator": "^1.0.5", "server-name-generator": "^1.0.5",
"waku-js": "../../build/main",
"web-vitals": "^1.1.1" "web-vitals": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
@ -38,8 +38,8 @@
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\" -c ../../.cspell.json", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\" -c ../../.cspell.json",
"fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --write", "fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --write",
"fix:lint": "eslint src --ext .ts --ext .tsx --fix", "fix:lint": "eslint src --ext .ts --ext .tsx --fix",
"waku-js:build": "cd ../; npm run build", "js-waku:build": "cd ../; npm run build",
"predeploy": "run-s waku-js:build build", "predeploy": "run-s js-waku:build build",
"deploy": "gh-pages -d build" "deploy": "gh-pages -d build"
}, },
"eslintConfig": { "eslintConfig": {

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<meta <meta
name="description" name="description"
content="Chat app powered by waku-js" content="Chat app powered by js-waku"
/> />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a

View File

@ -1,6 +1,6 @@
{ {
"short_name": "Waku v2 chat app", "short_name": "Waku v2 chat app",
"name": "Chat app powered by waku-js", "name": "Chat app powered by js-waku",
"icons": [ "icons": [
{ {
"src": "favicon.ico", "src": "favicon.ico",

View File

@ -1,7 +1,7 @@
import PeerId from 'peer-id'; import PeerId from 'peer-id';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import './App.css'; import './App.css';
import { ChatMessage, WakuMessage, StoreCodec, Waku } from 'waku-js'; import { ChatMessage, WakuMessage, StoreCodec, Waku } from 'js-waku';
import handleCommand from './command'; import handleCommand from './command';
import Room from './Room'; import Room from './Room';
import { WakuContext } from './WakuContext'; import { WakuContext } from './WakuContext';

View File

@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
import { ChatMessage } from 'waku-js'; import { ChatMessage } from 'js-waku';
import { import {
Message, Message,
MessageText, MessageText,

View File

@ -1,4 +1,4 @@
import { ChatMessage, WakuMessage } from 'waku-js'; import { ChatMessage, WakuMessage } from 'js-waku';
import { ChatContentTopic } from './App'; import { ChatContentTopic } from './App';
import ChatList from './ChatList'; import ChatList from './ChatList';
import MessageInput from './MessageInput'; import MessageInput from './MessageInput';

View File

@ -1,5 +1,5 @@
import { createContext, useContext } from 'react'; import { createContext, useContext } from 'react';
import { Waku } from 'waku-js'; import { Waku } from 'js-waku';
export type WakuContextType = { export type WakuContextType = {
waku?: Waku; waku?: Waku;

View File

@ -1,6 +1,6 @@
import { multiaddr } from 'multiaddr'; import { multiaddr } from 'multiaddr';
import PeerId from 'peer-id'; import PeerId from 'peer-id';
import { Waku } from 'waku-js'; import { Waku } from 'js-waku';
function help(): string[] { function help(): string[] {
return [ return [

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{ {
"name": "waku-js", "name": "js-waku",
"version": "0.1.0", "version": "0.1.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "waku-js", "name": "js-waku",
"version": "0.1.0", "version": "0.1.0",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"dependencies": { "dependencies": {

View File

@ -1,11 +1,11 @@
{ {
"name": "waku-js", "name": "js-waku",
"version": "0.1.0", "version": "0.1.0",
"description": "TypeScript implementation of the Waku v2 protocol", "description": "TypeScript implementation of the Waku v2 protocol",
"main": "build/main/index.js", "main": "build/main/index.js",
"typings": "build/main/index.d.ts", "typings": "build/main/index.d.ts",
"module": "build/module/index.js", "module": "build/module/index.js",
"repository": "https://github.com/status-im/waku-js", "repository": "https://github.com/status-im/js-waku",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"keywords": [ "keywords": [
"waku", "waku",
@ -48,7 +48,7 @@
"doc:json": "typedoc src/ --exclude **/*.spec.ts --json build/docs/typedoc.json", "doc:json": "typedoc src/ --exclude **/*.spec.ts --json build/docs/typedoc.json",
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs", "doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
"version": "standard-version", "version": "standard-version",
"reset-hard": "git clean -dfx && git reset --hard && npm i", "reset-hard": "git clean -dfx && git reset --hard && npm i && npm run build && for d in examples/*; do (cd $d; npm i); done",
"prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish" "prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish"
}, },
"engines": { "engines": {

View File

@ -1,5 +1,5 @@
/** /**
* A collection of tools to test the WakuJS library. * A collection of tools to test the js-waku library.
* *
* @hidden * @hidden
* @module * @module