pmcf 6.51.0 → 6.52.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/package.json +1 -1
- package/src/core-service.mjs +2 -2
- package/src/services/bind.mjs +30 -4
package/package.json
CHANGED
package/src/core-service.mjs
CHANGED
|
@@ -401,9 +401,9 @@ export function serviceEndpoints(sources, options = {}) {
|
|
|
401
401
|
return options.join ? res.join(options.join) : res;
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
-
export function endpoints(entries) {
|
|
404
|
+
export function endpoints(entries,filter) {
|
|
405
405
|
return asArray(entries)
|
|
406
|
-
.map(e => e.endpoints())
|
|
406
|
+
.map(e => e.endpoints(filter))
|
|
407
407
|
.flat();
|
|
408
408
|
}
|
|
409
409
|
|
package/src/services/bind.mjs
CHANGED
|
@@ -248,6 +248,7 @@ export class bind_key extends base {
|
|
|
248
248
|
`${this.name}.conf`,
|
|
249
249
|
[
|
|
250
250
|
`key "${this.name}" {`,
|
|
251
|
+
` # ` + asArray(this.tags).join(','),
|
|
251
252
|
` algorithm ${this.algorithm};`,
|
|
252
253
|
` secret "${this.secret}";`,
|
|
253
254
|
"};"
|
|
@@ -319,7 +320,7 @@ const acl_attribute = {
|
|
|
319
320
|
class bind_view extends bind_object {
|
|
320
321
|
static priority = 1;
|
|
321
322
|
static attributes = {
|
|
322
|
-
|
|
323
|
+
notify: { ...boolean_attribute_writable_false, name: "notify" },
|
|
323
324
|
hasCatalog: { ...boolean_attribute_writable_false, name: "hasCatalog" },
|
|
324
325
|
hasForeignDomainRecords: {
|
|
325
326
|
...boolean_attribute_writable_false,
|
|
@@ -358,7 +359,11 @@ class bind_view extends bind_object {
|
|
|
358
359
|
},
|
|
359
360
|
retry: { ...duration_attribute_writable, name: "retry", default: 72000 },
|
|
360
361
|
expire: { ...duration_attribute_writable, name: "expire", default: 600000 },
|
|
361
|
-
minimum: {
|
|
362
|
+
minimum: {
|
|
363
|
+
...duration_attribute_writable,
|
|
364
|
+
name: "minimum",
|
|
365
|
+
default: 60000
|
|
366
|
+
},
|
|
362
367
|
sharedWith: {
|
|
363
368
|
...default_attribute_writable,
|
|
364
369
|
name: "sharedWith",
|
|
@@ -408,7 +413,7 @@ class bind_view extends bind_object {
|
|
|
408
413
|
type: bind_zone_config,
|
|
409
414
|
backpointer: owner_attribute,
|
|
410
415
|
name: "zoneConfigs"
|
|
411
|
-
}
|
|
416
|
+
}
|
|
412
417
|
};
|
|
413
418
|
|
|
414
419
|
static {
|
|
@@ -851,6 +856,24 @@ export class bind extends CoreService {
|
|
|
851
856
|
return false;
|
|
852
857
|
}
|
|
853
858
|
|
|
859
|
+
async writeServers(outputControl) {
|
|
860
|
+
await writeLines(
|
|
861
|
+
join(outputControl.dir, "etc/named"),
|
|
862
|
+
`servers.conf`,
|
|
863
|
+
asArray(this.primaries).map(service => {
|
|
864
|
+
return [
|
|
865
|
+
`server ${service.address()} {`,
|
|
866
|
+
" keys {" +
|
|
867
|
+
asArray(service.keys.values())
|
|
868
|
+
.map(key => ` ${key.name};`)
|
|
869
|
+
.join("") +
|
|
870
|
+
" };",
|
|
871
|
+
"};"
|
|
872
|
+
];
|
|
873
|
+
})
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
|
|
854
877
|
async *preparePackages(dir) {
|
|
855
878
|
const packageData = await this.preparePackage(dir);
|
|
856
879
|
|
|
@@ -877,7 +900,10 @@ export class bind extends CoreService {
|
|
|
877
900
|
hasContent ||= present;
|
|
878
901
|
}
|
|
879
902
|
|
|
880
|
-
|
|
903
|
+
let present;
|
|
904
|
+
present = await this.writeServers(outputControl);
|
|
905
|
+
|
|
906
|
+
present = await this.writeForwarders(outputControl);
|
|
881
907
|
|
|
882
908
|
if (hasContent || present) {
|
|
883
909
|
yield packageData;
|