@decentnetwork/lan 0.1.64 → 0.1.66

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.
@@ -30,7 +30,7 @@ function shellQuote(parts) {
30
30
  .map((p) => "'" + p.replace(/'/g, `'\\''`) + "'")
31
31
  .join(" ");
32
32
  }
33
- import { ConfigLoader } from "../config/loader.js";
33
+ import { ConfigLoader, DEFAULT_DORAS } from "../config/loader.js";
34
34
  export class DaemonServer {
35
35
  config;
36
36
  useMockTun;
@@ -602,9 +602,15 @@ export class DaemonServer {
602
602
  * operator can see it IS working without enabling DECENT_DEBUG.
603
603
  */
604
604
  startPeerStatusSummary() {
605
+ const doraNames = new Map(DEFAULT_DORAS.map((d) => [d.userid, d.name]));
605
606
  const label = (p) => {
606
607
  const id = p.carrierId || p.pubkey;
607
- return p.name || this.ipam?.resolveCarrierId(id)?.name || `${id.slice(0, 8)}…`;
608
+ // `@decentnetwork/peer` is the SDK's generic default name treat it as
609
+ // "unnamed" and fall back to the dora name, then the roster (IPAM) name,
610
+ // then a short id, so the line reads "dora-mac, cn, …" not a wall of
611
+ // identical "@decentnetwork/peer".
612
+ const real = p.name && p.name !== "@decentnetwork/peer" ? p.name : undefined;
613
+ return real || doraNames.get(id) || this.ipam?.resolveCarrierId(id)?.name || `${id.slice(0, 8)}…`;
608
614
  };
609
615
  const tick = () => {
610
616
  if (!this.isRunning || !this.peerManager)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/lan",
3
- "version": "0.1.64",
3
+ "version": "0.1.66",
4
4
  "description": "Private virtual LAN for self-hosted services and AI agents, built on Elastos Carrier. NAT-traversal, name service, ACL, all over a peer-to-peer mesh — no public IP required.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@decentnetwork/dora": "^0.1.6",
78
- "@decentnetwork/peer": "^0.1.26",
78
+ "@decentnetwork/peer": "^0.1.27",
79
79
  "js-yaml": "^4.1.0",
80
80
  "yargs": "^17.7.2"
81
81
  },