pmcf 6.22.8 → 6.24.0
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 +2 -2
- package/src/base.mjs +14 -0
- package/src/network-address.mjs +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.24.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"aggregated-map": "^1.0.10",
|
|
54
54
|
"content-entry-transform": "^1.7.0",
|
|
55
|
-
"ip-utilties": "^3.
|
|
55
|
+
"ip-utilties": "^3.12.0",
|
|
56
56
|
"npm-pkgbuild": "^20.8.13",
|
|
57
57
|
"pacc": "^11.1.3",
|
|
58
58
|
"package-directory": "^8.2.0",
|
package/src/base.mjs
CHANGED
|
@@ -45,6 +45,7 @@ export class Base {
|
|
|
45
45
|
directory: { ...string_attribute_writable, name: "directory" },
|
|
46
46
|
packaging: { ...string_set_attribute_writable, name: "packaging" },
|
|
47
47
|
disabled: { ...boolean_attribute_writable, name: "disabled" },
|
|
48
|
+
enabled: { ...boolean_attribute_writable, name: "enabled" },
|
|
48
49
|
tags: { ...string_set_attribute_writable, name: "tags" },
|
|
49
50
|
template: { ...boolean_attribute_writable, name: "template", private: true }
|
|
50
51
|
};
|
|
@@ -564,6 +565,19 @@ export class Base {
|
|
|
564
565
|
}
|
|
565
566
|
}
|
|
566
567
|
|
|
568
|
+
/**
|
|
569
|
+
* @return {boolean}
|
|
570
|
+
*/
|
|
571
|
+
get enabled()
|
|
572
|
+
{
|
|
573
|
+
return !this.disabled;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
set enabled(value)
|
|
577
|
+
{
|
|
578
|
+
this.disabled = !value;
|
|
579
|
+
}
|
|
580
|
+
|
|
567
581
|
get tags() {
|
|
568
582
|
return this.unionFromDirections(["this", "extends"], "_tags");
|
|
569
583
|
}
|
package/src/network-address.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getAttribute
|
|
6
6
|
} from "pacc";
|
|
7
7
|
|
|
8
|
-
import { familyIP, formatCIDR, decodeIP } from "ip-utilties";
|
|
8
|
+
import { familyIP, formatCIDR, decodeIP, addressType } from "ip-utilties";
|
|
9
9
|
import { Subnet } from "./subnet.mjs";
|
|
10
10
|
import { Owner, addType } from "pmcf";
|
|
11
11
|
import { NetworkInterface } from "./network-interfaces/network-interface.mjs";
|
|
@@ -19,6 +19,7 @@ export class NetworkAddress {
|
|
|
19
19
|
static key = "address";
|
|
20
20
|
static attributes = {
|
|
21
21
|
address: { ...name_attribute, name: "address" },
|
|
22
|
+
type: { ...string_attribute, name: "type" },
|
|
22
23
|
cidrAddress: { ...string_attribute, name: "cidrAddress" },
|
|
23
24
|
networkInterface: {
|
|
24
25
|
...default_attribute,
|
|
@@ -68,6 +69,10 @@ export class NetworkAddress {
|
|
|
68
69
|
return formatCIDR(this.address, this.subnet.prefixLength);
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
get type() {
|
|
73
|
+
return addressType(this.address);
|
|
74
|
+
}
|
|
75
|
+
|
|
71
76
|
get fullName() {
|
|
72
77
|
return `${this.networkInterface.fullName}/${decodeIP(this.address)}`;
|
|
73
78
|
}
|