pmcf 6.32.3 → 6.32.5
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 +1 -1
- package/src/base.mjs +18 -12
- package/src/services/bind.mjs +1 -13
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -100,22 +100,28 @@ export class Base {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
materializeExtends() {
|
|
103
|
-
/*
|
|
104
|
-
console.log(
|
|
105
|
-
"materializeExtends",
|
|
106
|
-
this.fullName,
|
|
107
|
-
this.owner?.fullName,
|
|
108
|
-
[...this.extends].map(n => n.fullName)
|
|
109
|
-
);*/
|
|
110
|
-
|
|
111
103
|
for (const [path, attribute] of extendingAttributeIterator(
|
|
112
104
|
this.constructor,
|
|
113
|
-
attribute =>
|
|
114
|
-
attribute.collection &&
|
|
115
|
-
!attribute.type.primitive &&
|
|
116
|
-
!attribute.deferredExpression
|
|
105
|
+
attribute => attribute.collection && !attribute.type.primitive
|
|
117
106
|
)) {
|
|
107
|
+
if (attribute.deferredExpression) {
|
|
108
|
+
const name = attribute.name;
|
|
109
|
+
if (!this.hasOwnProperty(name)) {
|
|
110
|
+
for (const e of this.walkDirections(["extends"])) {
|
|
111
|
+
if (e.hasOwnProperty(name)) {
|
|
112
|
+
Object.defineProperty(this, name, {
|
|
113
|
+
get: () => e[name]
|
|
114
|
+
});
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
|
|
118
123
|
const collection = this[attribute.name];
|
|
124
|
+
|
|
119
125
|
if (typeof collection?.get === "function") {
|
|
120
126
|
for (const [name, extending] of this.mapFromDirections(
|
|
121
127
|
["extends"],
|
package/src/services/bind.mjs
CHANGED
|
@@ -645,13 +645,6 @@ function endpointAddresses(entries) {
|
|
|
645
645
|
return [];
|
|
646
646
|
}
|
|
647
647
|
|
|
648
|
-
/*
|
|
649
|
-
[...this.forwarders]
|
|
650
|
-
.map(e => e.endpoints())
|
|
651
|
-
.flat()
|
|
652
|
-
.filter(e => e.networkAddress)
|
|
653
|
-
.map(e => e.networkAddress?.address);
|
|
654
|
-
*/
|
|
655
648
|
return [...entries]
|
|
656
649
|
.map(e => e.endpoints())
|
|
657
650
|
.flat()
|
|
@@ -798,18 +791,13 @@ export class bind extends CoreService {
|
|
|
798
791
|
async writeForwarders(outputControl) {
|
|
799
792
|
// TODO formulate everything as pacc expression
|
|
800
793
|
|
|
801
|
-
/*
|
|
802
|
-
console.log("F",this.extends);
|
|
803
|
-
console.log("F0",this.fullName);
|
|
804
|
-
console.log("F1",this.forwarders);
|
|
805
|
-
*/
|
|
806
794
|
const forwarders = endpointAddresses(this.forwarders);
|
|
807
795
|
|
|
808
796
|
if (forwarders.length) {
|
|
809
797
|
await writeLines(
|
|
810
798
|
join(outputControl.dir, "etc/named/options"),
|
|
811
799
|
`forwarders.conf`,
|
|
812
|
-
addressesStatement("forwarders", forwarders)
|
|
800
|
+
addressesStatement("forwarders", forwarders, false, " ")
|
|
813
801
|
);
|
|
814
802
|
|
|
815
803
|
return true;
|