pmcf 6.44.7 → 6.44.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.44.7",
3
+ "version": "6.44.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -155,11 +155,9 @@ export const networkAttributes = {
155
155
  multicastDNS: { ...boolean_attribute_writable, name: "multicastDNS" }
156
156
  };
157
157
 
158
-
159
158
  export const networkAddressAttributes = {
160
159
  hostName: hostname_attribute,
161
160
  cidrAddresses: cidr_addresses_attribute,
162
- cidrAddress: cidr_address_attribute,
163
161
  addresses: { ...string_collection_attribute_writable, name: "addresses" },
164
162
  address: address_attribute
165
163
  };
package/src/host.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  priority_attribute,
10
10
  asArray
11
11
  } from "pacc";
12
- import { addresses, addType, assign } from "pmcf";
12
+ import { cidrAddresses, addresses, addType, assign } from "pmcf";
13
13
  import {
14
14
  networkAddressAttributes,
15
15
  networkInterfaces_attribute,
@@ -297,6 +297,10 @@ export class Host extends ServiceOwner {
297
297
  return addresses(this.networkAddresses());
298
298
  }
299
299
 
300
+ get cidrAddresses() {
301
+ return cidrAddresses(this.networkAddresses());
302
+ }
303
+
300
304
  get subnets() {
301
305
  return new AggregatedMap(
302
306
  [...this.networkInterfaces.values()].map(ni => ni.subnets)
@@ -1,8 +1,7 @@
1
1
  import { join } from "node:path";
2
2
  import {
3
3
  string_attribute_writable,
4
- default_collection_attribute_writable,
5
- number_attribute_writable
4
+ default_collection_attribute_writable
6
5
  } from "pacc";
7
6
  import { network_attribute } from "../common-attributes.mjs";
8
7
  import { Host, cidrAddresses, addType } from "pmcf";
@@ -53,9 +52,9 @@ export class NetworkInterface extends SkeletonNetworkInterface {
53
52
  private: true
54
53
  },
55
54
  hwaddr: { ...string_attribute_writable, name: "hwaddr" },
56
- destination: { ...string_attribute_writable, name: "destination" },
55
+ destination: { ...string_attribute_writable, name: "destination" }
57
56
 
58
- /*
57
+ /*
59
58
  InitialCongestionWindow: { ...number_attribute_writable, name: "InitialCongestionWindow", default: 10, configurable: true },
60
59
  InitialAdvertisedReceiveWindow: { ...number_attribute_writable, name: "InitialAdvertisedReceiveWindow", default: 10, configurable: true },
61
60
  */
@@ -73,6 +72,10 @@ export class NetworkInterface extends SkeletonNetworkInterface {
73
72
  _hwaddr;
74
73
  _class;
75
74
 
75
+ get cidrAddresses() {
76
+ return cidrAddresses(this.networkAddresses());
77
+ }
78
+
76
79
  addSubnet(address) {
77
80
  if (this.network) {
78
81
  return this.network.addSubnet(address);
@@ -113,7 +116,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
113
116
  set hostName(value) {
114
117
  this._hostName = value;
115
118
  }
116
-
119
+
117
120
  get domains() {
118
121
  if (!this.host) {
119
122
  return new Set();