@highway1/cli 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/discover.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highway1/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "CLI tool for Clawiverse network",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf dist"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@highway1/core": "0.1.
|
|
16
|
+
"@highway1/core": "0.1.16",
|
|
17
17
|
"chalk": "^5.3.0",
|
|
18
18
|
"cli-table3": "^0.6.5",
|
|
19
19
|
"commander": "^12.1.0",
|
package/src/commands/discover.ts
CHANGED
|
@@ -48,12 +48,12 @@ export function registerDiscoverCommand(program: Command): void {
|
|
|
48
48
|
await node.start();
|
|
49
49
|
|
|
50
50
|
spin.text = 'Waiting for DHT peers...';
|
|
51
|
-
// Wait until connected to at least one peer,
|
|
51
|
+
// Wait until connected to at least one peer, then give DHT time to sync
|
|
52
52
|
await new Promise<void>((resolve) => {
|
|
53
53
|
const timeout = setTimeout(resolve, 15000);
|
|
54
54
|
node.libp2p.addEventListener('peer:connect', () => {
|
|
55
55
|
clearTimeout(timeout);
|
|
56
|
-
setTimeout(resolve,
|
|
56
|
+
setTimeout(resolve, 3000); // give DHT routing table time to populate
|
|
57
57
|
}, { once: true });
|
|
58
58
|
});
|
|
59
59
|
|