pmcf 2.62.3 → 2.63.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/base.mjs +2 -10
- package/src/services/bind.mjs +19 -0
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -459,12 +459,7 @@ export class Base {
|
|
|
459
459
|
}
|
|
460
460
|
|
|
461
461
|
property(name) {
|
|
462
|
-
|
|
463
|
-
if (value === undefined && this.owner) {
|
|
464
|
-
return this.owner.property(name);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
return value;
|
|
462
|
+
return this._properties?.[name] ?? this.owner?.property(name);
|
|
468
463
|
}
|
|
469
464
|
|
|
470
465
|
expand(object) {
|
|
@@ -484,10 +479,7 @@ export class Base {
|
|
|
484
479
|
}
|
|
485
480
|
if (object instanceof Map) {
|
|
486
481
|
return new Map(
|
|
487
|
-
[...object].map(([k, v]) => [
|
|
488
|
-
this.expand(k),
|
|
489
|
-
this.expand(v)
|
|
490
|
-
])
|
|
482
|
+
[...object].map(([k, v]) => [this.expand(k), this.expand(v)])
|
|
491
483
|
);
|
|
492
484
|
}
|
|
493
485
|
|
package/src/services/bind.mjs
CHANGED
|
@@ -400,6 +400,7 @@ export class BindService extends ExtraSourceService {
|
|
|
400
400
|
configs.push(catalogConfig);
|
|
401
401
|
|
|
402
402
|
zone.catalogZone = {
|
|
403
|
+
catalog: true,
|
|
403
404
|
id: `catalog.${domain}`,
|
|
404
405
|
file: `${locationName}/catalog.${domain}.zone`,
|
|
405
406
|
records: new Set([
|
|
@@ -555,6 +556,8 @@ export class BindService extends ExtraSourceService {
|
|
|
555
556
|
console.log(`config: ${config.name}`);
|
|
556
557
|
|
|
557
558
|
const content = [];
|
|
559
|
+
const openContent = [];
|
|
560
|
+
|
|
558
561
|
for (const zone of config.zones) {
|
|
559
562
|
console.log(` file: ${zone.file}`);
|
|
560
563
|
|
|
@@ -582,6 +585,14 @@ export class BindService extends ExtraSourceService {
|
|
|
582
585
|
content.push(`};`);
|
|
583
586
|
content.push("");
|
|
584
587
|
|
|
588
|
+
if (!zone.catalog) {
|
|
589
|
+
openContent.push(
|
|
590
|
+
`zone \"${zone.id}\" {`,
|
|
591
|
+
` in-view protected;`,
|
|
592
|
+
"}"
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
|
|
585
596
|
let maxKeyLength = 0;
|
|
586
597
|
for (const r of zone.records) {
|
|
587
598
|
if (r.key.length > maxKeyLength) {
|
|
@@ -603,6 +614,14 @@ export class BindService extends ExtraSourceService {
|
|
|
603
614
|
config.name,
|
|
604
615
|
content
|
|
605
616
|
);
|
|
617
|
+
|
|
618
|
+
if (openContent.length) {
|
|
619
|
+
await writeLines(
|
|
620
|
+
join(packageData.dir, "etc/named/open"),
|
|
621
|
+
config.name,
|
|
622
|
+
openContent
|
|
623
|
+
);
|
|
624
|
+
}
|
|
606
625
|
}
|
|
607
626
|
}
|
|
608
627
|
}
|