pmcf 1.30.5 → 1.30.6

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.
@@ -55,7 +55,7 @@ async function generateNetworkDefs(host, dir) {
55
55
 
56
56
  const networkSections = [sectionLines("Match", { Name: ni.name })];
57
57
 
58
- for (const Address of ni.ipAddressesWithNetmask) {
58
+ for (const Address of ni.ipAddressesWithPrefixLength) {
59
59
  networkSections.push(
60
60
  "",
61
61
  sectionLines("Address", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.30.5",
3
+ "version": "1.30.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -43,7 +43,7 @@
43
43
  "pacc": "^3.3.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/node": "^22.12.0",
46
+ "@types/node": "^22.13.0",
47
47
  "ava": "^6.2.0",
48
48
  "c8": "^10.1.3",
49
49
  "documentation": "^14.0.3",
package/src/model.mjs CHANGED
@@ -464,9 +464,9 @@ export class NetworkInterface extends Base {
464
464
  return this.#ipAddresses;
465
465
  }
466
466
 
467
- get ipAddressesWithNetmask() {
467
+ get ipAddressesWithPrefixLength() {
468
468
  return this.#ipAddresses.map(a =>
469
- isIPv4Address(a) ? `${a}/${this.network.netmask}` : a
469
+ isIPv4Address(a) ? `${a}/${this.network.prefixLength}` : a
470
470
  );
471
471
  }
472
472
 
package/src/owner.mjs CHANGED
@@ -287,7 +287,7 @@ export class Network extends Owner {
287
287
  return super.networkNamed(name);
288
288
  }
289
289
 
290
- get netmask() {
290
+ get prefixLength() {
291
291
  const m = this.ipv4?.match(/\/(\d+)$/);
292
292
  if (m) {
293
293
  return parseInt(m[1]);
@@ -307,7 +307,7 @@ export class Network extends Owner {
307
307
  ...super.propertyNames,
308
308
  "kind",
309
309
  "ipv4",
310
- "netmask",
310
+ "prefixLength",
311
311
  "scope",
312
312
  "metric",
313
313
  "bridge"
package/types/model.d.mts CHANGED
@@ -56,7 +56,7 @@ export class NetworkInterface extends Base {
56
56
  set network(networkOrName: any);
57
57
  get network(): any;
58
58
  get ipAddresses(): any[];
59
- get ipAddressesWithNetmask(): any[];
59
+ get ipAddressesWithPrefixLength(): any[];
60
60
  get ipv4Addresses(): any[];
61
61
  get ipv6Addresses(): any[];
62
62
  get scope(): any;
package/types/owner.d.mts CHANGED
@@ -35,7 +35,7 @@ export class Network extends Owner {
35
35
  ipv4: any;
36
36
  subnet: any;
37
37
  bridge: any;
38
- get netmask(): number;
38
+ get prefixLength(): number;
39
39
  get subnetAddress(): any;
40
40
  }
41
41
  export class Subnet extends Base {