feat: use nwaku/go-waku docker images instead of building binaries (#1259)

* merge: master

* fix: CI

* use: js script instead of shell script to run precheck and mocha

* use `console.log` instead of `debug.log` for `run-tests.js`
This commit is contained in:
Danish Arora 2023-04-17 10:29:36 +05:30 committed by GitHub
parent 0a80cd4315
commit dc3774c0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 548 additions and 214 deletions

View File

@ -114,7 +114,8 @@
"webfonts",
"websockets",
"wifi",
"xsalsa20"
"xsalsa20",
"statusteam"
],
"flagWords": [],
"ignorePaths": [

View File

@ -9,7 +9,6 @@ on:
pull_request:
env:
NWAKU_VERSION: "v0.16.0"
NODE_JS: "18"
jobs:
@ -57,24 +56,15 @@ jobs:
node:
runs-on: ubuntu-latest
env:
WAKUNODE_IMAGE: "statusteam/nim-waku:v0.16.0"
steps:
- uses: actions/checkout@v3
- name: Get nwaku
shell: bash
run: |
mkdir -p nwaku/build
cd nwaku
wget "https://github.com/status-im/nwaku/releases/download/${NWAKU_VERSION}/nim-waku-ubuntu-latest.tar.gz"
tar xavf nim-waku-ubuntu-latest.tar.gz
- name: Ensure wakunode2 is ready
shell: bash
run: |
uname -a
cd nwaku/build
./wakunode2 --help
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- uses: ./.github/actions/npm
- run: npm run build:esm
- run: npm run test:node
@ -95,35 +85,15 @@ jobs:
name: nwaku-logs
path: packages/tests/log/
node_with_go_waku:
node_with_go_waku_master:
runs-on: ubuntu-latest
env:
GO_WAKU_VERSION: "0.5.2"
WAKU_SERVICE_NODE_DIR: ../../go-waku
WAKU_SERVICE_NODE_BIN: ./waku
WAKUNODE_IMAGE: "statusteam/go-waku:latest"
WAKU_SERVICE_NODE_PARAMS: "--min-relay-peers-to-publish=0" # Can be removed once https://github.com/status-im/nwaku/issues/1004 is done
DEBUG: "waku*"
steps:
- uses: actions/checkout@v3
- name: Get go-waku
shell: bash
run: |
pwd
mkdir -p go-waku/
cd go-waku
wget "https://github.com/status-im/go-waku/releases/download/v${GO_WAKU_VERSION}/gowaku-${GO_WAKU_VERSION}-x86_64.deb"
sudo apt install ./gowaku-${GO_WAKU_VERSION}-x86_64.deb
cp $(which waku) ./
- name: Ensure go-waku is ready
shell: bash
run: |
uname -a
cd packages/core
cd "${WAKU_SERVICE_NODE_DIR}"
"${WAKU_SERVICE_NODE_BIN}" --version
- name: Install NodeJS
uses: actions/setup-node@v3
with:
@ -153,37 +123,15 @@ jobs:
runs-on: ubuntu-latest
env:
DEBUG: "waku*"
WAKUNODE_IMAGE: "statusteam/nim-waku:deploy-wakuv2-test"
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
- name: Install NodeJS
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_JS }}
- name: Pull nwaku origin/master
run: |
cd nwaku
git fetch origin
git checkout origin/master
- uses: ./.github/actions/npm
- name: build nwaku
run: |
cd packages/tests
npm run nwaku:force-build
- name: Ensure wakunode2 is ready
shell: bash
run: |
uname -a
cd nwaku
./build/wakunode2 --help
- run: npm run build:esm
- run: npm run test:node
env:

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "nim-waku"]
path = nwaku
url = https://github.com/status-im/nim-waku.git

View File

@ -11,23 +11,21 @@ This project board is to prioritize the work of core contributors so do not be d
Do note that we have a [CI](./.github/workflows/ci.yml) powered by GitHub Action.
To help ensure your PR passes, just run before committing:
- `npm run fix`: To format your code,
- `npm run test`: To run all tests, including lint checks.
- `npm run fix`: To format your code,
- `npm run check`: To check your code for linting errors,
- `npm run test`: To run all tests
## Build & Test
To build and test this repository, you need:
- [Node.js & npm](https://nodejs.org/en/).
- Chrome (for browser testing).
- g++ & make (to build nim-waku)
- [Node.js & npm](https://nodejs.org/en/).
- Chrome (for browser testing).
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.
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/master/package.json)).
This is why the relevant docker images for the node is pulled as part of the `pretest` script that runs before `npm run test`.
If you do not want to run `npm run test`, you can still build nim-waku by running `npm run pretest`.
If you do not want to run `npm run test`, you can still pull the relevant nim-waku docker image by running `npm run pretest`.
Note that we run tests in both NodeJS and browser environments (using [karma](https://karma-runner.github.io/)).
Files named `*.node.spec.ts` are only run in NodeJS environment;
@ -62,4 +60,3 @@ Commit messages should never contain any `@` mentions (usernames prefixed with "
Please refer to the [Git manual](https://git-scm.com/doc) for more information
about Git.

1
nwaku

@ -1 +0,0 @@
Subproject commit 03f0de365cfee3a946257a6ce8a61fe19284976c

345
package-lock.json generated
View File

@ -1424,6 +1424,11 @@
"node": ">=6.9.0"
}
},
"node_modules/@balena/dockerignore": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz",
"integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="
},
"node_modules/@bcoe/v8-coverage": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
@ -5116,6 +5121,26 @@
"@types/ms": "*"
}
},
"node_modules/@types/docker-modem": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.2.tgz",
"integrity": "sha512-qC7prjoEYR2QEe6SmCVfB1x3rfcQtUr1n4x89+3e0wSTMQ/KYCyf+/RAA9n2tllkkNc6//JMUZePdFRiGIWfaQ==",
"dev": true,
"dependencies": {
"@types/node": "*",
"@types/ssh2": "*"
}
},
"node_modules/@types/dockerode": {
"version": "3.3.15",
"resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.15.tgz",
"integrity": "sha512-az35KbxZZUCRgCoXqJUEvEbsOL3L7UbItuHSYoZ0uo/MWuNc03y7XMBVSCLLvxpxWK8X8pM5PoM0F/5TFHDF0g==",
"dev": true,
"dependencies": {
"@types/docker-modem": "*",
"@types/node": "*"
}
},
"node_modules/@types/eslint": {
"version": "8.21.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz",
@ -5299,6 +5324,15 @@
"integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==",
"dev": true
},
"node_modules/@types/ssh2": {
"version": "1.11.8",
"resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.8.tgz",
"integrity": "sha512-BsD9yrKmD8avjbR+N5tvv0jxYHzizcrC156YkPbNjqbu81tCm4ZdS7D6KtXbZfz+CFHgFrTC7j046Lr39W5eig==",
"dev": true,
"dependencies": {
"@types/node": "^18.11.18"
}
},
"node_modules/@types/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz",
@ -6878,6 +6912,14 @@
"node": ">=0.10.0"
}
},
"node_modules/asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
"dependencies": {
"safer-buffer": "~2.1.0"
}
},
"node_modules/assertion-error": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
@ -6987,7 +7029,6 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"funding": [
{
"type": "github",
@ -7012,6 +7053,14 @@
"node": "^4.5.0 || >= 5.9"
}
},
"node_modules/bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
"dependencies": {
"tweetnacl": "^0.14.3"
}
},
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
@ -7040,7 +7089,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dev": true,
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
@ -7228,7 +7276,6 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"funding": [
{
"type": "github",
@ -7263,6 +7310,15 @@
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"node_modules/buildcheck": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.3.tgz",
"integrity": "sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA==",
"optional": true,
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/builtin-modules": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
@ -7809,8 +7865,7 @@
"node_modules/chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"dev": true
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
},
"node_modules/chrome-trace-event": {
"version": "1.0.3",
@ -8432,6 +8487,20 @@
"node": ">=8"
}
},
"node_modules/cpu-features": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.4.tgz",
"integrity": "sha512-fKiZ/zp1mUwQbnzb9IghXtHtDoTMtNeb8oYGx6kX2SYfhnG0HNdBEBIzB9b5KlXu5DQPhfy3mInbBxFcgwAr3A==",
"hasInstallScript": true,
"optional": true,
"dependencies": {
"buildcheck": "0.0.3",
"nan": "^2.15.0"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/cpy": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/cpy/-/cpy-9.0.1.tgz",
@ -9749,6 +9818,44 @@
"dns-query": "bin/dns-query"
}
},
"node_modules/docker-modem": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz",
"integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==",
"dependencies": {
"debug": "^4.1.1",
"readable-stream": "^3.5.0",
"split-ca": "^1.0.1",
"ssh2": "^1.11.0"
},
"engines": {
"node": ">= 8.0"
}
},
"node_modules/dockerode": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz",
"integrity": "sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==",
"dependencies": {
"@balena/dockerignore": "^1.0.2",
"docker-modem": "^3.0.0",
"tar-fs": "~2.0.1"
},
"engines": {
"node": ">= 8.0"
}
},
"node_modules/dockerode/node_modules/tar-fs": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
"integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==",
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
"pump": "^3.0.0",
"tar-stream": "^2.0.0"
}
},
"node_modules/doctrine": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@ -10359,7 +10466,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"dependencies": {
"once": "^1.4.0"
}
@ -12220,8 +12326,7 @@
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"node_modules/fs-extra": {
"version": "8.1.0",
@ -13039,7 +13144,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true,
"funding": [
{
"type": "github",
@ -13175,8 +13279,7 @@
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ini": {
"version": "1.3.8",
@ -17253,8 +17356,7 @@
"node_modules/mkdirp-classic": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"dev": true
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"node_modules/mocha": {
"version": "10.2.0",
@ -17748,6 +17850,12 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"node_modules/nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
"optional": true
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
@ -21279,7 +21387,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"dependencies": {
"wrappy": "1"
}
@ -23739,7 +23846,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@ -24681,7 +24787,6 @@
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -25163,7 +25268,6 @@
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true,
"funding": [
{
"type": "github",
@ -25196,8 +25300,7 @@
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/sanitize-filename": {
"version": "1.6.3",
@ -26362,6 +26465,11 @@
"node": "*"
}
},
"node_modules/split-ca": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz",
"integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ=="
},
"node_modules/split2": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz",
@ -26376,6 +26484,23 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
"integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="
},
"node_modules/ssh2": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz",
"integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==",
"hasInstallScript": true,
"dependencies": {
"asn1": "^0.2.4",
"bcrypt-pbkdf": "^1.0.2"
},
"engines": {
"node": ">=10.16.0"
},
"optionalDependencies": {
"cpu-features": "~0.0.4",
"nan": "^2.16.0"
}
},
"node_modules/stack-trace": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
@ -26488,7 +26613,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"dependencies": {
"safe-buffer": "~5.2.0"
}
@ -26823,7 +26947,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dev": true,
"dependencies": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
@ -27364,6 +27487,11 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
"node_modules/tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -28174,8 +28302,7 @@
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dev": true
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/util/node_modules/inherits": {
"version": "2.0.3",
@ -28646,8 +28773,7 @@
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/write-file-atomic": {
"version": "3.0.3",
@ -29463,6 +29589,7 @@
"@waku/utils": "*",
"app-root-path": "^3.1.0",
"debug": "^4.3.4",
"dockerode": "^3.3.5",
"p-timeout": "^6.1.0",
"portfinder": "^1.0.32",
"tail": "^2.2.6"
@ -29473,6 +29600,7 @@
"@libp2p/interface-peer-discovery-compliance-tests": "^2.0.5",
"@libp2p/interface-peer-id": "^2.0.1",
"@types/chai": "^4.3.4",
"@types/dockerode": "^3.3.15",
"@types/mocha": "^10.0.1",
"@types/tail": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^5.57.0",
@ -30523,6 +30651,11 @@
"to-fast-properties": "^2.0.0"
}
},
"@balena/dockerignore": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz",
"integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="
},
"@bcoe/v8-coverage": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
@ -33318,6 +33451,26 @@
"@types/ms": "*"
}
},
"@types/docker-modem": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.2.tgz",
"integrity": "sha512-qC7prjoEYR2QEe6SmCVfB1x3rfcQtUr1n4x89+3e0wSTMQ/KYCyf+/RAA9n2tllkkNc6//JMUZePdFRiGIWfaQ==",
"dev": true,
"requires": {
"@types/node": "*",
"@types/ssh2": "*"
}
},
"@types/dockerode": {
"version": "3.3.15",
"resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.15.tgz",
"integrity": "sha512-az35KbxZZUCRgCoXqJUEvEbsOL3L7UbItuHSYoZ0uo/MWuNc03y7XMBVSCLLvxpxWK8X8pM5PoM0F/5TFHDF0g==",
"dev": true,
"requires": {
"@types/docker-modem": "*",
"@types/node": "*"
}
},
"@types/eslint": {
"version": "8.21.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz",
@ -33501,6 +33654,15 @@
"integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==",
"dev": true
},
"@types/ssh2": {
"version": "1.11.8",
"resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.11.8.tgz",
"integrity": "sha512-BsD9yrKmD8avjbR+N5tvv0jxYHzizcrC156YkPbNjqbu81tCm4ZdS7D6KtXbZfz+CFHgFrTC7j046Lr39W5eig==",
"dev": true,
"requires": {
"@types/node": "^18.11.18"
}
},
"@types/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz",
@ -34406,6 +34568,7 @@
"@libp2p/interface-peer-id": "^2.0.1",
"@libp2p/peer-id": "^2.0.2",
"@types/chai": "^4.3.4",
"@types/dockerode": "^3.3.15",
"@types/mocha": "^10.0.1",
"@types/tail": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^5.57.0",
@ -34422,6 +34585,7 @@
"chai": "^4.3.7",
"cspell": "^6.31.1",
"debug": "^4.3.4",
"dockerode": "^3.3.5",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-eslint-comments": "^3.2.0",
@ -35176,6 +35340,14 @@
"integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
"dev": true
},
"asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assertion-error": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
@ -35259,8 +35431,7 @@
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"base64id": {
"version": "2.0.0",
@ -35268,6 +35439,14 @@
"integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
"dev": true
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
@ -35293,7 +35472,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dev": true,
"requires": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
@ -35438,7 +35616,6 @@
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
@ -35456,6 +35633,12 @@
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"buildcheck": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.3.tgz",
"integrity": "sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA==",
"optional": true
},
"builtin-modules": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
@ -35842,8 +36025,7 @@
"chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"dev": true
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
},
"chrome-trace-event": {
"version": "1.0.3",
@ -36319,6 +36501,16 @@
}
}
},
"cpu-features": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.4.tgz",
"integrity": "sha512-fKiZ/zp1mUwQbnzb9IghXtHtDoTMtNeb8oYGx6kX2SYfhnG0HNdBEBIzB9b5KlXu5DQPhfy3mInbBxFcgwAr3A==",
"optional": true,
"requires": {
"buildcheck": "0.0.3",
"nan": "^2.15.0"
}
},
"cpy": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/cpy/-/cpy-9.0.1.tgz",
@ -37268,6 +37460,40 @@
"utf8-codec": "^1.0.0"
}
},
"docker-modem": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz",
"integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==",
"requires": {
"debug": "^4.1.1",
"readable-stream": "^3.5.0",
"split-ca": "^1.0.1",
"ssh2": "^1.11.0"
}
},
"dockerode": {
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz",
"integrity": "sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==",
"requires": {
"@balena/dockerignore": "^1.0.2",
"docker-modem": "^3.0.0",
"tar-fs": "~2.0.1"
},
"dependencies": {
"tar-fs": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
"integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==",
"requires": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
"pump": "^3.0.0",
"tar-stream": "^2.0.0"
}
}
}
},
"doctrine": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@ -37732,7 +37958,6 @@
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dev": true,
"requires": {
"once": "^1.4.0"
}
@ -39071,8 +39296,7 @@
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"fs-extra": {
"version": "8.1.0",
@ -39679,8 +39903,7 @@
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"ignore": {
"version": "5.2.4",
@ -39770,8 +39993,7 @@
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
"version": "1.3.8",
@ -42720,8 +42942,7 @@
"mkdirp-classic": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"dev": true
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
},
"mocha": {
"version": "10.2.0",
@ -43076,6 +43297,12 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"nan": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
"integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
"optional": true
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
@ -45573,7 +45800,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dev": true,
"requires": {
"wrappy": "1"
}
@ -47210,7 +47436,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"dev": true,
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@ -47860,7 +48085,6 @@
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@ -48221,8 +48445,7 @@
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"safe-regex-test": {
"version": "1.0.0",
@ -48238,8 +48461,7 @@
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sanitize-filename": {
"version": "1.6.3",
@ -49141,6 +49363,11 @@
"through": "2"
}
},
"split-ca": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz",
"integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ=="
},
"split2": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz",
@ -49155,6 +49382,17 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
"integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="
},
"ssh2": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz",
"integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==",
"requires": {
"asn1": "^0.2.4",
"bcrypt-pbkdf": "^1.0.2",
"cpu-features": "~0.0.4",
"nan": "^2.16.0"
}
},
"stack-trace": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
@ -49254,7 +49492,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dev": true,
"requires": {
"safe-buffer": "~5.2.0"
}
@ -49491,7 +49728,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dev": true,
"requires": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
@ -49876,6 +50112,11 @@
"yargs": "^17.0.0"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
},
"type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@ -50450,8 +50691,7 @@
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dev": true
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"utils-merge": {
"version": "1.0.1",
@ -50817,8 +51057,7 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"write-file-atomic": {
"version": "3.0.3",

View File

@ -58,10 +58,6 @@
"fix": "run-s fix:*",
"fix:lint": "eslint src *.js --fix",
"pretest": "run-s pretest:*",
"pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive",
"pretest:2-build-nwaku": "[ -f '../../nwaku/build/wakunode2' ] || run-s nwaku:build",
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$PROC wakunode2)",
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
"check": "run-s check:*",
"check:tsc": "tsc -p tsconfig.dev.json",
"check:lint": "eslint src *.js",

View File

@ -6,4 +6,7 @@ module.exports = {
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
},
globals: {
process: true,
},
};

41
packages/tests/README.md Normal file
View File

@ -0,0 +1,41 @@
# Description
This package contains tests for the `js-waku` library.
# Pre-requisites
Some of the tests from this package require a running `nwaku` or `go-waku` node. These nodes are setup to be run in a docker container.
Therefore, you need to have `docker` installed on your machine to run the tests.
# Running interop tests
- The tests by default run against an `nwaku` node with the image name specified in `nwaku.ts` and `packages/tests/package.json`. The tests can be run against a different image by setting the environment variable `WAKUNODE_IMAGE` to the desired image.
- The tests can be run against a `go-waku` node by setting the environment variable `WAKUNODE_IMAGE` to the desired `go-waku` image.
- Whatever `WAKUNODE_IMAGE` is set to, the tests will run against that image. If the image is not available locally, the tests will pull the image from the docker hub.
You can run the tests by running the following command:
```bash
WAKUNODE_IMAGE=explicit-image-name npm run test:node
```
Or against the default docker image by running:
```bash
npm run test:node
```
- You can also run the tests against a local `nwaku` or `go-waku` node by setting the environment variable `WAKUNODE_IMAGE` to the name of the image. The tests will then run against the local image.
- For example, to run the tests against a local checkout of `nwaku` or `go-waku`, build the image first manually. You can build the image by running the following command:
```bash
docker build path-to-dockerfile -t image-name
```
Then, you can run the tests by running the following command:
```bash
WAKUNODE_IMAGE=image-name npm run test:node
```

View File

@ -37,17 +37,12 @@
"build:esm": "tsc",
"fix": "run-s fix:*",
"fix:lint": "eslint src tests --fix",
"pretest": "run-s pretest:*",
"pretest:1-init-git-submodules": "[ -f '../../nwaku/build/wakunode2' ] || git submodule update --init --recursive",
"pretest:2-build-nwaku": "[ -f '../../nwaku/build/wakunode2' ] || run-s nwaku:build",
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off\" make -j$PROC wakunode2)",
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
"check": "run-s check:*",
"check:lint": "eslint src tests",
"check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"",
"check:tsc": "tsc -p tsconfig.dev.json",
"test": "run-s test:*",
"test:node": "TS_NODE_PROJECT=./tsconfig.dev.json mocha",
"test:node": "node ./src/run-tests.js",
"reset-hard": "git clean -dfx -e .idea && git reset --hard && npm i && npm run build"
},
"engines": {
@ -61,6 +56,7 @@
"@waku/utils": "*",
"app-root-path": "^3.1.0",
"debug": "^4.3.4",
"dockerode": "^3.3.5",
"p-timeout": "^6.1.0",
"portfinder": "^1.0.32",
"tail": "^2.2.6"
@ -71,6 +67,7 @@
"@libp2p/interface-peer-discovery-compliance-tests": "^2.0.5",
"@libp2p/interface-peer-id": "^2.0.1",
"@types/chai": "^4.3.4",
"@types/dockerode": "^3.3.15",
"@types/mocha": "^10.0.1",
"@types/tail": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^5.57.0",

View File

@ -1,4 +1,4 @@
import { ChildProcess, spawn } from "child_process";
import fs from "fs";
import type { PeerId } from "@libp2p/interface-peer-id";
import { peerIdFromString } from "@libp2p/peer-id";
@ -6,8 +6,8 @@ import { Multiaddr, multiaddr } from "@multiformats/multiaddr";
import { DefaultPubSubTopic } from "@waku/core";
import { isDefined } from "@waku/utils";
import { bytesToHex, hexToBytes } from "@waku/utils/bytes";
import appRoot from "app-root-path";
import debug from "debug";
import Docker from "dockerode";
import portfinder from "portfinder";
import { existsAsync, mkdirAsync, openAsync } from "./async_fs.js";
@ -16,15 +16,15 @@ import waitForLine from "./log_file.js";
const log = debug("waku:nwaku");
const WAKU_SERVICE_NODE_DIR =
process.env.WAKU_SERVICE_NODE_DIR ?? appRoot + "/nwaku";
const WAKU_SERVICE_NODE_BIN =
process.env.WAKU_SERVICE_NODE_BIN ??
WAKU_SERVICE_NODE_DIR + "/build/wakunode2";
const WAKU_SERVICE_NODE_PARAMS =
process.env.WAKU_SERVICE_NODE_PARAMS ?? undefined;
const NODE_READY_LOG_LINE = "Node setup complete";
const DOCKER_IMAGE_NAME =
process.env.WAKUNODE_IMAGE || "statusteam/nim-waku:v0.16.0";
const isGoWaku = DOCKER_IMAGE_NAME.includes("go-waku");
const LOG_DIR = "./log";
const OneMillion = BigInt(1_000_000);
@ -90,8 +90,8 @@ export interface MessageRpcResponse {
}
export class Nwaku {
private process?: ChildProcess;
private pid?: number;
private docker: Docker;
private containerId?: string;
private peerId?: PeerId;
private multiaddrWithId?: Multiaddr;
private websocketPort?: number;
@ -124,6 +124,7 @@ export class Nwaku {
}
constructor(logName: string) {
this.docker = new Docker();
this.logPath = `${LOG_DIR}/nwaku_${logName}.log`;
}
@ -139,7 +140,7 @@ export class Nwaku {
}
}
const logFile = await openAsync(this.logPath, "w");
await openAsync(this.logPath, "w");
const mergedArgs = defaultArgs();
@ -154,82 +155,118 @@ export class Nwaku {
});
});
this.rpcPort = ports[0];
const isGoWaku = WAKU_SERVICE_NODE_BIN.endsWith("/waku");
if (isGoWaku && !args.logLevel) {
args.logLevel = LogLevel.Debug;
}
const [rpcPort, tcpPort, websocketPort, discv5UdpPort] = ports;
this.rpcPort = rpcPort;
this.websocketPort = websocketPort;
// Object.assign overrides the properties with the source (if there are conflicts)
Object.assign(
mergedArgs,
{
tcpPort: ports[1],
rpcPort: this.rpcPort,
websocketPort: ports[2],
...(args?.peerExchange && { discv5UdpPort: ports[3] }),
rpcPort,
tcpPort,
websocketPort,
...(args?.peerExchange && { discv5UdpPort }),
},
args
);
this.websocketPort = mergedArgs.websocketPort;
process.env.WAKUNODE2_STORE_MESSAGE_DB_URL = "";
const argsArray = argsToArray(mergedArgs);
const natExtIp = "--nat=extip:127.0.0.1";
argsArray.push(natExtIp);
const rpcAddress = "--rpc-address=0.0.0.0";
argsArray.push(natExtIp, rpcAddress);
if (WAKU_SERVICE_NODE_PARAMS) {
argsArray.push(WAKU_SERVICE_NODE_PARAMS);
}
log(`nwaku args: ${argsArray.join(" ")}`);
this.process = spawn(WAKU_SERVICE_NODE_BIN, argsArray, {
cwd: WAKU_SERVICE_NODE_DIR,
stdio: [
"ignore", // stdin
logFile, // stdout
logFile, // stderr
],
});
this.pid = this.process.pid;
log(
`nwaku ${this.process.pid} started at ${new Date().toLocaleTimeString()}`
);
if (this.containerId) {
this.stop();
}
try {
await this.confirmImageExistsOrPull();
const container = await this.docker.createContainer({
Image: DOCKER_IMAGE_NAME,
HostConfig: {
PortBindings: {
[`${rpcPort}/tcp`]: [{ HostPort: rpcPort.toString() }],
[`${tcpPort}/tcp`]: [{ HostPort: tcpPort.toString() }],
[`${websocketPort}/tcp`]: [{ HostPort: websocketPort.toString() }],
...(args?.peerExchange && {
[`${discv5UdpPort}/udp`]: [
{ HostPort: discv5UdpPort.toString() },
],
}),
},
},
ExposedPorts: {
[`${rpcPort}/tcp`]: {},
[`${tcpPort}/tcp`]: {},
[`${websocketPort}/tcp`]: {},
...(args?.peerExchange && {
[`${discv5UdpPort}/udp`]: {},
}),
},
Cmd: argsArray,
});
await container.start();
const logStream = fs.createWriteStream(this.logPath);
container.logs(
{ follow: true, stdout: true, stderr: true },
(err, stream) => {
if (err) {
throw err;
}
if (stream) {
stream.pipe(logStream);
}
}
);
this.containerId = container.id;
this.process.on("exit", (signal) => {
log(
`nwaku ${
this.process ? this.process.pid : this.pid
} process exited with ${signal} at ${new Date().toLocaleTimeString()}`
this.containerId
} started at ${new Date().toLocaleTimeString()}`
);
});
this.process.on("error", (err) => {
log(
`nwaku ${
this.process ? this.process.pid : this.pid
} process encountered an error: ${err} at ${new Date().toLocaleTimeString()}`
);
});
log(`Waiting to see '${NODE_READY_LOG_LINE}' in nwaku logs`);
await this.waitForLog(NODE_READY_LOG_LINE, 15000);
if (process.env.CI) await delay(100);
log("nwaku node has been started");
log(`Waiting to see '${NODE_READY_LOG_LINE}' in nwaku logs`);
await this.waitForLog(NODE_READY_LOG_LINE, 15000);
if (process.env.CI) await delay(100);
log("nwaku node has been started");
} catch (error) {
log(`Error starting nwaku: ${error}`);
if (this.containerId) await this.stop();
throw error;
}
}
public stop(): void {
const pid = this.process ? this.process.pid : this.pid;
log(`nwaku ${pid} getting SIGINT at ${new Date().toLocaleTimeString()}`);
if (!this.process) throw "nwaku process not set";
const res = this.process.kill("SIGINT");
log(`nwaku ${pid} interrupted:`, res);
this.process = undefined;
public async stop(): Promise<void> {
if (!this.containerId) throw "nwaku containerId not set";
const container = this.docker.getContainer(this.containerId);
log(
`Shutting down nwaku container ID ${
this.containerId
} at ${new Date().toLocaleTimeString()}`
);
await container.remove({ force: true });
this.containerId = undefined;
}
async waitForLog(msg: string, timeout: number): Promise<void> {
@ -383,10 +420,6 @@ export class Nwaku {
async getMultiaddrWithId(): Promise<Multiaddr> {
if (this.multiaddrWithId) return this.multiaddrWithId;
if (!this.websocketPort) {
return Promise.reject("No websocket port defined.");
}
const peerId = await this.getPeerId();
this.multiaddrWithId = multiaddr(
@ -436,10 +469,34 @@ export class Nwaku {
}
private checkProcess(): void {
if (!this.process) {
throw "Nwaku hasn't started";
if (!this.containerId || !this.docker.getContainer(this.containerId)) {
throw "Nwaku container hasn't started";
}
}
async confirmImageExistsOrPull(): Promise<void> {
log(`Confirming that image ${DOCKER_IMAGE_NAME} exists`);
const doesImageExist = this.docker.getImage(DOCKER_IMAGE_NAME);
if (!doesImageExist) {
await new Promise<void>((resolve, reject) => {
this.docker.pull(DOCKER_IMAGE_NAME, {}, (err, stream) => {
if (err) {
reject(err);
}
this.docker.modem.followProgress(stream, (err, result) => {
if (err) {
reject(err);
}
if (result) {
resolve();
}
});
});
});
}
log(`Image ${DOCKER_IMAGE_NAME} successfully found`);
}
}
export function argsToArray(args: Args): Array<string> {
@ -460,7 +517,7 @@ export function argsToArray(args: Args): Array<string> {
export function defaultArgs(): Args {
return {
listenAddress: "127.0.0.1",
listenAddress: "0.0.0.0",
rpc: true,
relay: false,
rpcAdmin: true,

View File

@ -0,0 +1,50 @@
import { exec, spawn } from "child_process";
import { promisify } from "util";
const execAsync = promisify(exec);
const WAKUNODE_IMAGE =
process.env.WAKUNODE_IMAGE || "statusteam/nim-waku:v0.16.0";
async function main() {
try {
await execAsync(`docker inspect ${WAKUNODE_IMAGE}`);
console.log("Using local image");
} catch (error) {
console.log("Pulling image...");
await execAsync(`docker pull ${WAKUNODE_IMAGE}`);
console.log("Image pulled");
}
// Run mocha tests
const mocha = spawn(
"npx",
[
"mocha",
"--require",
"ts-node/register",
"--project",
"./tsconfig.dev.json",
],
{
stdio: "inherit",
}
);
mocha.on("error", (error) => {
console.log(`Error running mocha tests: ${error.message}`);
process.exit(1);
});
mocha.on("exit", (code) => {
console.log(`Mocha tests exited with code ${code}`);
process.exit(code || 0);
});
}
main().catch((error) => {
console.log(error);
process.exit(1);
});

View File

@ -12,7 +12,8 @@ describe("ENR Interop: nwaku", function () {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -43,7 +43,8 @@ describe("Waku Message Ephemeral field", () => {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -25,7 +25,8 @@ describe("Waku Filter", () => {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -27,7 +27,8 @@ describe("Waku Light Push [node only]", () => {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -10,7 +10,7 @@ describe("nwaku", () => {
const actual = argsToArray(args);
const expected = [
"--listen-address=127.0.0.1",
"--listen-address=0.0.0.0",
"--rpc=true",
"--relay=false",
"--rpc-admin=true",

View File

@ -357,7 +357,8 @@ describe("Waku Relay [node only]", () => {
});
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});
@ -427,7 +428,8 @@ describe("Waku Relay [node only]", () => {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku1 &&
waku1.stop().catch((e) => console.log("Waku failed to stop", e));
!!waku2 &&

View File

@ -49,7 +49,8 @@ describe("Waku Store", () => {
});
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});
@ -580,7 +581,8 @@ describe("Waku Store, custom pubsub topic", () => {
});
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -13,7 +13,7 @@ describe("Wait for remote peer", function () {
afterEach(async function () {
if (nwaku) {
nwaku.stop();
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
nwaku = undefined;
}
waku1?.stop().catch((e) => console.log("Waku failed to stop", e));

View File

@ -31,7 +31,8 @@ describe("Waku Dial [node only]", function () {
let nwaku: Nwaku;
afterEach(async function () {
!!nwaku && nwaku.stop();
!!nwaku &&
nwaku.stop().catch((e) => console.log("Nwaku failed to stop", e));
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
});

View File

@ -5,6 +5,6 @@
"rootDir": "src",
"tsBuildInfoFile": "dist/.tsbuildinfo"
},
"include": ["src"],
"include": ["src", "src/run-tests.js"],
"exclude": ["src/**/*.spec.ts", "src/test_utils"]
}