pmcf 6.8.3 → 6.8.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.4",
|
|
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.7.
|
|
55
|
+
"ip-utilties": "^3.7.1",
|
|
56
56
|
"npm-pkgbuild": "^20.8.2",
|
|
57
57
|
"pacc": "^10.4.1",
|
|
58
58
|
"package-directory": "^8.2.0",
|
package/src/dns-utils.mjs
CHANGED
|
@@ -109,6 +109,10 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
get domainNames() {
|
|
112
|
+
if(!this.host) {
|
|
113
|
+
//console.log("NO HOST",this.fullName);
|
|
114
|
+
return new Set();
|
|
115
|
+
}
|
|
112
116
|
return this.hostName
|
|
113
117
|
? this.host.directDomainNames.union(
|
|
114
118
|
new Set([[this.hostName, this.host.domain].join(".")])
|
package/src/services/bind.mjs
CHANGED
|
@@ -156,20 +156,12 @@ class bind_group extends Base {
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
async packageContent(outputControl) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
if (this.access.length) {
|
|
162
|
-
hasContent ||= await this.generateACLs(outputControl);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (this.entries.length) {
|
|
166
|
-
hasContent ||= await this.generateZoneDefs(outputControl, this.entries);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return hasContent;
|
|
159
|
+
return await this.generateACLs(outputControl) && await this.generateZoneDefs(outputControl, this.entries);
|
|
170
160
|
}
|
|
171
161
|
|
|
172
162
|
async generateACLs(outputControl) {
|
|
163
|
+
console.log("generateACLs", this.name);
|
|
164
|
+
|
|
173
165
|
const acls = addressesStatement(
|
|
174
166
|
`acl ${this.name}`,
|
|
175
167
|
addresses(this.access, { aggregate: true })
|
|
@@ -181,12 +173,16 @@ class bind_group extends Base {
|
|
|
181
173
|
`0-acl-${this.name}.conf`,
|
|
182
174
|
acls
|
|
183
175
|
);
|
|
176
|
+
|
|
177
|
+
return true;
|
|
184
178
|
}
|
|
185
179
|
|
|
186
|
-
return
|
|
180
|
+
return false;
|
|
187
181
|
}
|
|
188
182
|
|
|
189
183
|
async generateZoneDefs(outputControl, sources) {
|
|
184
|
+
console.log("generateZoneDefs", this.name);
|
|
185
|
+
|
|
190
186
|
for (const source of sources) {
|
|
191
187
|
console.log(
|
|
192
188
|
"ZONE",
|
|
@@ -195,7 +191,7 @@ class bind_group extends Base {
|
|
|
195
191
|
);
|
|
196
192
|
|
|
197
193
|
for (const domain of source.localDomains) {
|
|
198
|
-
const locationName = source.
|
|
194
|
+
const locationName = source.name;
|
|
199
195
|
const reverseZones = new Map();
|
|
200
196
|
|
|
201
197
|
const config = {
|
|
@@ -504,18 +500,16 @@ export class bind extends ExtraSourceService {
|
|
|
504
500
|
}
|
|
505
501
|
|
|
506
502
|
async *preparePackages(dir) {
|
|
507
|
-
const basePackageDir = dir;
|
|
508
503
|
const packageData = this.packageData;
|
|
509
|
-
packageData.sources.push(new FileContentProvider(
|
|
504
|
+
packageData.sources.push(new FileContentProvider(dir));
|
|
510
505
|
|
|
511
|
-
const outputControl = newOutputControl(packageData,
|
|
506
|
+
const outputControl = newOutputControl(packageData, dir);
|
|
512
507
|
|
|
513
508
|
let hasContent = false;
|
|
514
509
|
|
|
515
|
-
console.log("BIND GROUPS", [...this.groups.keys()]);
|
|
516
|
-
|
|
517
510
|
for (const group of this.groups.values()) {
|
|
518
|
-
|
|
511
|
+
const present = await group.packageContent(outputControl);
|
|
512
|
+
hasContent ||= present;
|
|
519
513
|
}
|
|
520
514
|
|
|
521
515
|
hasContent ||= await this.writeForwarders(outputControl);
|