@lingyao037/openclaw-lingyao-cli 1.3.3 → 1.3.4

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/cli.mjs CHANGED
@@ -38,20 +38,19 @@ const NC = '\x1b[0m';
38
38
  function getMachineId() {
39
39
  try {
40
40
  const interfaces = os.networkInterfaces();
41
- const macs = [];
41
+ const macSet = new Set();
42
42
 
43
43
  for (const iface of Object.values(interfaces)) {
44
44
  if (!iface) continue;
45
45
  for (const alias of iface) {
46
46
  if (!alias.internal && alias.mac && alias.mac !== '00:00:00:00:00:00') {
47
- macs.push(alias.mac);
47
+ macSet.add(alias.mac);
48
48
  }
49
49
  }
50
50
  }
51
51
 
52
- if (macs.length > 0) {
53
- macs.sort();
54
- const macStr = macs.join('');
52
+ if (macSet.size > 0) {
53
+ const macStr = [...macSet].sort().join('');
55
54
  // MD5 哈希,与 orchestrator.ts 保持一致
56
55
  return createHash('md5').update(macStr).digest('hex').substring(0, 8);
57
56
  }
package/dist/index.js CHANGED
@@ -2234,16 +2234,16 @@ var ErrorHandler = class {
2234
2234
  function getMachineId() {
2235
2235
  try {
2236
2236
  const interfaces = networkInterfaces();
2237
- const macs = [];
2237
+ const macSet = /* @__PURE__ */ new Set();
2238
2238
  for (const iface of Object.values(interfaces)) {
2239
2239
  if (!iface) continue;
2240
2240
  for (const alias of iface) {
2241
2241
  if (!alias.internal && alias.mac && alias.mac !== "00:00:00:00:00:00") {
2242
- macs.push(alias.mac);
2242
+ macSet.add(alias.mac);
2243
2243
  }
2244
2244
  }
2245
2245
  }
2246
- macs.sort();
2246
+ const macs = [...macSet].sort();
2247
2247
  if (macs.length > 0) {
2248
2248
  return createHash("md5").update(macs.join("")).digest("hex").substring(0, 8);
2249
2249
  }