@highway1/cli 0.1.31 → 0.1.32

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 CHANGED
@@ -118284,10 +118284,15 @@ function registerJoinCommand(program2) {
118284
118284
  });
118285
118285
  const hasRelayAddr = () => node.getMultiaddrs().some((a2) => a2.includes("/p2p-circuit"));
118286
118286
  if (!hasRelayAddr()) {
118287
+ info("Waiting for relay reservation...");
118287
118288
  await new Promise((resolve) => {
118288
- const timeout = setTimeout(resolve, 5e3);
118289
+ const timeout = setTimeout(() => {
118290
+ info(`Relay reservation timeout after 5s. Multiaddrs: ${node.getMultiaddrs().join(", ")}`);
118291
+ resolve();
118292
+ }, 5e3);
118289
118293
  const check = () => {
118290
118294
  if (hasRelayAddr()) {
118295
+ info(`Relay address acquired: ${node.getMultiaddrs().filter((a2) => a2.includes("/p2p-circuit")).join(", ")}`);
118291
118296
  clearTimeout(timeout);
118292
118297
  resolve();
118293
118298
  }
@@ -118295,6 +118300,8 @@ function registerJoinCommand(program2) {
118295
118300
  node.libp2p.addEventListener("self:peer:update", check);
118296
118301
  setTimeout(() => node.libp2p.removeEventListener("self:peer:update", check), 5e3);
118297
118302
  });
118303
+ } else {
118304
+ info(`Relay address already present: ${node.getMultiaddrs().filter((a2) => a2.includes("/p2p-circuit")).join(", ")}`);
118298
118305
  }
118299
118306
  connectSpin.succeed("Connected to network!");
118300
118307
  const cardSpin = spinner("Publishing Agent Card to DHT...");