pmcf 6.31.3 → 6.31.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.31.3",
3
+ "version": "6.31.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -43,8 +43,6 @@ import { addHook } from "../hooks.mjs";
43
43
  import { owner_attribute } from "../common-attributes.mjs";
44
44
  import { NetworkAddress } from "../network-address.mjs";
45
45
 
46
- const bindNetworkAddressTypes = networkAddressType + "|bind_group";
47
-
48
46
  class bind_zone extends Base {
49
47
  static priority = 1;
50
48
  static key = "id";
@@ -63,6 +61,14 @@ class bind_zone extends Base {
63
61
  addType(this);
64
62
  }
65
63
 
64
+ get service() {
65
+ return this.owner.service;
66
+ }
67
+
68
+ get type() {
69
+ return this.service.serverType;
70
+ }
71
+
66
72
  get isCatalog() {
67
73
  return false;
68
74
  }
@@ -80,6 +86,11 @@ class bind_zone extends Base {
80
86
  }
81
87
 
82
88
  get file() {
89
+ const fileType = this.type === "master" ? "zone" : "raw";
90
+ return `${this.directory}/${this.domain}.${fileType}`;
91
+ }
92
+
93
+ get textFile() {
83
94
  return `${this.directory}/${this.domain}.zone`;
84
95
  }
85
96
 
@@ -209,7 +220,7 @@ class bind_zone_config extends Base {
209
220
 
210
221
  await writeLines(
211
222
  join(dir, "var/lib/named"),
212
- zone.file,
223
+ zone.textFile,
213
224
  [...zone.records]
214
225
  .sort(sortZoneRecords)
215
226
  .map(r => r.toString(maxKeyLength, group.recordTTL))