pmcf 6.39.10 → 6.39.12

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/bin/pmcf-diagram CHANGED
@@ -4,7 +4,7 @@ import { prepare } from "../src/cli.mjs";
4
4
 
5
5
  const { root, args } = await prepare();
6
6
 
7
- const location = await root.load(args[0]);
7
+ const location = root.expression(args[0]);
8
8
 
9
9
  function q(str) {
10
10
  return str.match(/^\w+$/) ? str : `"${str}"`;
@@ -12,7 +12,7 @@ function q(str) {
12
12
 
13
13
  console.log("graph G {");
14
14
  console.log(" node [shape=record];");
15
- for await (const host of location.hosts()) {
15
+ for await (const host of location.hosts.values()) {
16
16
  if (host.clusters.size === 0) {
17
17
  console.log(
18
18
  ` ${q(host.name)} [label="${host.name}|{${[
@@ -25,7 +25,7 @@ for await (const host of location.hosts()) {
25
25
  }
26
26
  }
27
27
 
28
- for await (const network of location.networks) {
28
+ for await (const network of location.networks.values()) {
29
29
  console.log(
30
30
  ` ${q(network.name)} [label="${network.name}\\n${[...network.subnets.keys()]
31
31
  .map(s => s.address)
@@ -46,7 +46,7 @@ for await (const network of location.networks) {
46
46
  }
47
47
  }
48
48
 
49
- for await (const cluster of location.clusters) {
49
+ for await (const cluster of location.clusters.values()) {
50
50
  console.log(` subgraph cluster_${cluster.name} {`);
51
51
 
52
52
  for (const ni of cluster.members) {
@@ -72,8 +72,10 @@ for await (const cluster of location.clusters) {
72
72
  console.log(` } [label="${cluster.name}"];`);
73
73
  }
74
74
 
75
+ /*
75
76
  for (const bridge of location.bridges) {
76
77
  console.log(` ${[...bridge].map(b => q(b.name)).join(" -- ")};`);
77
78
  }
79
+ */
78
80
 
79
81
  console.log("}");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.39.10",
3
+ "version": "6.39.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,7 +11,7 @@ export class ethernet extends NetworkInterface {
11
11
  }
12
12
  };
13
13
 
14
- static commonNamePattern = /^(eth|end|en)\d+$/;
14
+ static commonNamePattern = /^(eth|end|en|enx)[\da-zA-Z]+$/;
15
15
 
16
16
  static {
17
17
  addType(this);