pmcf 6.11.2 → 6.12.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/bin/pmcf-info +50 -13
- package/package.json +2 -2
- package/src/core-service.mjs +0 -1
- package/src/services/bind.mjs +4 -1
package/bin/pmcf-info
CHANGED
|
@@ -10,30 +10,67 @@ for (const expression of args) {
|
|
|
10
10
|
show(result);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function show(value) {
|
|
13
|
+
function show(value, indent = 0) {
|
|
14
14
|
if (value instanceof Iterator) {
|
|
15
15
|
for (const v of value) {
|
|
16
16
|
show(v);
|
|
17
17
|
}
|
|
18
18
|
} else {
|
|
19
|
-
|
|
19
|
+
const type = value.constructor;
|
|
20
|
+
console.log(`${" ".repeat(indent)}${value.fullName}(${type.name}):`);
|
|
21
|
+
|
|
22
|
+
const ml = maxNameLength(type);
|
|
23
|
+
const name = attribute => " " + attribute.name.padEnd(ml) + ": ";
|
|
24
|
+
|
|
25
|
+
for (const [path, attribute] of extendingAttributeIterator(
|
|
26
|
+
type,
|
|
27
|
+
attribute =>
|
|
28
|
+
!attribute.key && !attribute.private && attribute.type.primitive
|
|
29
|
+
)) {
|
|
30
|
+
const v = value.attribute(attribute.name);
|
|
31
|
+
if (v !== undefined) {
|
|
32
|
+
if (attribute.collection) {
|
|
33
|
+
console.log(`${name(attribute)}${[...v]}`);
|
|
34
|
+
} else {
|
|
35
|
+
console.log(`${name(attribute)}${v}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
20
39
|
|
|
21
40
|
for (const [path, attribute] of extendingAttributeIterator(
|
|
22
|
-
|
|
23
|
-
attribute => !attribute.private
|
|
41
|
+
type,
|
|
42
|
+
attribute => !attribute.private && !attribute.type.primitive
|
|
24
43
|
)) {
|
|
25
|
-
|
|
44
|
+
const v = value[attribute.name];
|
|
45
|
+
if (v !== undefined) {
|
|
46
|
+
if (attribute.collection) {
|
|
47
|
+
console.log(name(attribute));
|
|
48
|
+
|
|
49
|
+
if (attribute.backpointer) {
|
|
50
|
+
for (const o of v.values()) {
|
|
51
|
+
show(o, indent + 2);
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
for (const o of v.values()) {
|
|
55
|
+
console.log(" ".repeat(indent + 2) + o.fullName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
console.log(`${name(attribute)}${v.fullName}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
26
62
|
}
|
|
27
|
-
ex(value);
|
|
28
63
|
}
|
|
29
64
|
}
|
|
30
65
|
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
66
|
+
function maxNameLength(type) {
|
|
67
|
+
let maxLength = 0;
|
|
68
|
+
for (const [path, attribute] of extendingAttributeIterator(
|
|
69
|
+
type,
|
|
70
|
+
attribute => !attribute.key && !attribute.private
|
|
71
|
+
)) {
|
|
72
|
+
maxLength = Math.max(maxLength, attribute.name.length);
|
|
38
73
|
}
|
|
74
|
+
|
|
75
|
+
return maxLength;
|
|
39
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"aggregated-map": "^1.0.7",
|
|
54
54
|
"content-entry-transform": "^1.6.9",
|
|
55
|
-
"ip-utilties": "^3.
|
|
55
|
+
"ip-utilties": "^3.8.0",
|
|
56
56
|
"npm-pkgbuild": "^20.8.4",
|
|
57
57
|
"pacc": "^10.4.1",
|
|
58
58
|
"package-directory": "^8.2.0",
|
package/src/core-service.mjs
CHANGED
package/src/services/bind.mjs
CHANGED
|
@@ -42,7 +42,6 @@ class bind_group extends Base {
|
|
|
42
42
|
static priority = 1;
|
|
43
43
|
static attributes = {
|
|
44
44
|
name: name_attribute_writable,
|
|
45
|
-
owner: owner_attribute,
|
|
46
45
|
access: {
|
|
47
46
|
type: bindNetworkAddressTypes,
|
|
48
47
|
name: "access",
|
|
@@ -124,6 +123,10 @@ class bind_group extends Base {
|
|
|
124
123
|
hasLinkLocalAdresses = bind_group.attributes.hasLinkLocalAdresses.default;
|
|
125
124
|
recordTTL = "1W";
|
|
126
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Type of the group.
|
|
128
|
+
* @return {string} view | unknown
|
|
129
|
+
*/
|
|
127
130
|
get type() {
|
|
128
131
|
if (this.entries.length > 0 || this.sharedWith) {
|
|
129
132
|
return "view";
|