pmcf 6.14.0 → 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 +1 -1
- package/src/services/bind.mjs +11 -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
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",
|
|
@@ -148,24 +150,24 @@ class bind_group extends Base {
|
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
get defaultRecords() {
|
|
151
|
-
const
|
|
153
|
+
const service = this.service;
|
|
152
154
|
|
|
153
|
-
console.log(
|
|
155
|
+
/*console.log(
|
|
154
156
|
"nameService",
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
)
|
|
157
|
+
service.fullName,
|
|
158
|
+
service.domainName,
|
|
159
|
+
service.address()
|
|
160
|
+
);*/
|
|
159
161
|
|
|
160
162
|
return [
|
|
161
163
|
DNSRecord(
|
|
162
164
|
"@",
|
|
163
165
|
"SOA",
|
|
164
|
-
dnsFullName(
|
|
166
|
+
dnsFullName(service.domainName),
|
|
165
167
|
dnsFullName(this.administratorEmail.replace(/@/, ".")),
|
|
166
168
|
`(${this.soaUpdates.join(" ")})`
|
|
167
169
|
),
|
|
168
|
-
DNSRecord("@", "NS", dnsFullName(
|
|
170
|
+
DNSRecord("@", "NS", dnsFullName(service.address()))
|
|
169
171
|
];
|
|
170
172
|
}
|
|
171
173
|
|
|
@@ -557,7 +559,7 @@ export class bind extends ExtraSourceService {
|
|
|
557
559
|
const present = await this.writeForwarders(outputControl);
|
|
558
560
|
|
|
559
561
|
if (hasContent || present) {
|
|
560
|
-
console.log(packageData);
|
|
562
|
+
//console.log(packageData);
|
|
561
563
|
yield packageData;
|
|
562
564
|
}
|
|
563
565
|
}
|