pmcf 6.13.1 → 6.15.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 +27 -11
- package/package.json +4 -4
- package/src/services/bind.mjs +15 -9
package/bin/pmcf-info
CHANGED
|
@@ -10,17 +10,23 @@ for (const expression of args) {
|
|
|
10
10
|
show(result);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function show(value, indent = 0) {
|
|
13
|
+
function show(value, indent = 0, short = false) {
|
|
14
14
|
if (value instanceof Iterator) {
|
|
15
15
|
for (const v of value) {
|
|
16
|
-
show(v);
|
|
16
|
+
show(v, indent);
|
|
17
17
|
}
|
|
18
18
|
} else {
|
|
19
19
|
const type = value.constructor;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const prefix = (l = indent) => " ".repeat(l * 2);
|
|
22
21
|
const ml = maxNameLength(type);
|
|
23
|
-
const name = attribute
|
|
22
|
+
const name = (attribute, l = indent + 1) =>
|
|
23
|
+
prefix(l) + attribute.name.padEnd(ml) + ": ";
|
|
24
|
+
|
|
25
|
+
if (short) {
|
|
26
|
+
console.log(`${prefix()}${value.name}:`);
|
|
27
|
+
} else {
|
|
28
|
+
console.log(`${prefix()}${value.fullName}(${type.name}):`);
|
|
29
|
+
}
|
|
24
30
|
|
|
25
31
|
for (const [path, attribute] of extendingAttributeIterator(
|
|
26
32
|
type,
|
|
@@ -30,7 +36,10 @@ function show(value, indent = 0) {
|
|
|
30
36
|
const v = value.attribute(attribute.name);
|
|
31
37
|
if (v !== undefined) {
|
|
32
38
|
if (attribute.collection) {
|
|
33
|
-
|
|
39
|
+
const l = [...v];
|
|
40
|
+
if (l.length) {
|
|
41
|
+
console.log(`${name(attribute)}${l}`);
|
|
42
|
+
}
|
|
34
43
|
} else {
|
|
35
44
|
console.log(`${name(attribute)}${v}`);
|
|
36
45
|
}
|
|
@@ -44,15 +53,22 @@ function show(value, indent = 0) {
|
|
|
44
53
|
const v = value[attribute.name];
|
|
45
54
|
if (v !== undefined) {
|
|
46
55
|
if (attribute.collection) {
|
|
47
|
-
console.log(name(attribute));
|
|
48
|
-
|
|
49
56
|
if (attribute.backpointer) {
|
|
57
|
+
console.log(name(attribute));
|
|
50
58
|
for (const o of v.values()) {
|
|
51
|
-
show(o, indent + 2);
|
|
59
|
+
show(o, indent + 2, true);
|
|
52
60
|
}
|
|
53
61
|
} else {
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
const l = [...v];
|
|
63
|
+
|
|
64
|
+
if (l.length > 1) {
|
|
65
|
+
console.log(name(attribute));
|
|
66
|
+
|
|
67
|
+
for (const o of l) {
|
|
68
|
+
console.log(prefix(indent + 2) + o.fullName);
|
|
69
|
+
}
|
|
70
|
+
} else if (l.length === 1) {
|
|
71
|
+
console.log(name(attribute) + l[0].fullName);
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.15.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"lint:docs": "documentation lint ./src**/*.mjs"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"aggregated-map": "^1.0.
|
|
53
|
+
"aggregated-map": "^1.0.8",
|
|
54
54
|
"content-entry-transform": "^1.6.9",
|
|
55
|
-
"ip-utilties": "^3.8.
|
|
56
|
-
"npm-pkgbuild": "^20.8.
|
|
55
|
+
"ip-utilties": "^3.8.1",
|
|
56
|
+
"npm-pkgbuild": "^20.8.6",
|
|
57
57
|
"pacc": "^10.4.1",
|
|
58
58
|
"package-directory": "^8.2.0",
|
|
59
59
|
"yaml": "^2.9.0"
|
package/src/services/bind.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
boolean_attribute_writable_true,
|
|
16
16
|
boolean_attribute_writable_false,
|
|
17
17
|
integer_attribute_writable,
|
|
18
|
+
integer_attribute,
|
|
18
19
|
name_attribute_writable
|
|
19
20
|
} from "pacc";
|
|
20
21
|
import {
|
|
@@ -42,6 +43,7 @@ class bind_group extends Base {
|
|
|
42
43
|
static priority = 1;
|
|
43
44
|
static attributes = {
|
|
44
45
|
name: name_attribute_writable,
|
|
46
|
+
order: { ...integer_attribute, name: "order" },
|
|
45
47
|
access: {
|
|
46
48
|
type: bindNetworkAddressTypes,
|
|
47
49
|
name: "access",
|
|
@@ -135,6 +137,10 @@ class bind_group extends Base {
|
|
|
135
137
|
return "unknown";
|
|
136
138
|
}
|
|
137
139
|
|
|
140
|
+
get order() {
|
|
141
|
+
return this.sharedWith ? this.sharedWith.order + 1 : 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
138
144
|
get service() {
|
|
139
145
|
return this.owner;
|
|
140
146
|
}
|
|
@@ -144,24 +150,24 @@ class bind_group extends Base {
|
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
get defaultRecords() {
|
|
147
|
-
const
|
|
153
|
+
const service = this.service;
|
|
148
154
|
|
|
149
|
-
console.log(
|
|
155
|
+
/*console.log(
|
|
150
156
|
"nameService",
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)
|
|
157
|
+
service.fullName,
|
|
158
|
+
service.domainName,
|
|
159
|
+
service.address()
|
|
160
|
+
);*/
|
|
155
161
|
|
|
156
162
|
return [
|
|
157
163
|
DNSRecord(
|
|
158
164
|
"@",
|
|
159
165
|
"SOA",
|
|
160
|
-
dnsFullName(
|
|
166
|
+
dnsFullName(service.domainName),
|
|
161
167
|
dnsFullName(this.administratorEmail.replace(/@/, ".")),
|
|
162
168
|
`(${this.soaUpdates.join(" ")})`
|
|
163
169
|
),
|
|
164
|
-
DNSRecord("@", "NS", dnsFullName(
|
|
170
|
+
DNSRecord("@", "NS", dnsFullName(service.address()))
|
|
165
171
|
];
|
|
166
172
|
}
|
|
167
173
|
|
|
@@ -553,7 +559,7 @@ export class bind extends ExtraSourceService {
|
|
|
553
559
|
const present = await this.writeForwarders(outputControl);
|
|
554
560
|
|
|
555
561
|
if (hasContent || present) {
|
|
556
|
-
console.log(packageData);
|
|
562
|
+
//console.log(packageData);
|
|
557
563
|
yield packageData;
|
|
558
564
|
}
|
|
559
565
|
}
|