pmcf 6.17.0 → 6.17.1

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.17.0",
3
+ "version": "6.17.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "aggregated-map": "^1.0.8",
54
54
  "content-entry-transform": "^1.7.0",
55
- "ip-utilties": "^3.8.1",
55
+ "ip-utilties": "^3.9.0",
56
56
  "npm-pkgbuild": "^20.8.6",
57
57
  "pacc": "^10.4.1",
58
58
  "package-directory": "^8.2.0",
@@ -56,8 +56,6 @@ class bind_zone extends Base {
56
56
  addType(this);
57
57
  }
58
58
 
59
- records = new Set();
60
-
61
59
  get name() {
62
60
  return this.id;
63
61
  }
@@ -77,12 +75,21 @@ class bind_zone extends Base {
77
75
  get file() {
78
76
  return `${this.directory}/${this.domain}.zone`;
79
77
  }
78
+
79
+ constructor(owner, id, config, source) {
80
+ super();
81
+ this.id = id;
82
+ this.config = config;
83
+ this.source = source;
84
+ this.records = new Set(owner.defaultRecords);
85
+
86
+ config.zones.push(this);
87
+ }
80
88
  }
81
89
 
82
90
  class bind_zone_config extends Base {
83
91
  static priority = 1;
84
92
  static attributes = {
85
- type: { ...string_attribute, name: "type" },
86
93
  zones: { ...default_collection_attribute, type: bind_zone, name: "zones" }
87
94
  };
88
95
 
@@ -91,6 +98,16 @@ class bind_zone_config extends Base {
91
98
  }
92
99
 
93
100
  zones = [];
101
+
102
+ get type() {
103
+ return this.owner.service.serverType;
104
+ }
105
+
106
+ constructor(owner, name) {
107
+ super();
108
+ this.owner = owner;
109
+ this.name = name;
110
+ }
94
111
  }
95
112
 
96
113
  class bind_group extends Base {
@@ -128,6 +145,12 @@ class bind_group extends Base {
128
145
  backpointer: owner_attribute,
129
146
  name: "zones"
130
147
  },
148
+ zoneConfigs: {
149
+ ...default_collection_attribute,
150
+ type: bind_zone_config,
151
+ backpointer: owner_attribute,
152
+ name: "zoneConfigs"
153
+ },
131
154
  sharedWith: {
132
155
  ...default_attribute_writable,
133
156
  name: "sharedWith",
@@ -181,6 +204,7 @@ class bind_group extends Base {
181
204
  access = [];
182
205
  allowedUpdates = [];
183
206
  entries = [];
207
+ zoneConfigs = [];
184
208
  exclude = new Set();
185
209
  excludeInterfaceKinds = new Set();
186
210
  notify = true;
@@ -245,25 +269,17 @@ class bind_group extends Base {
245
269
  get zones() {
246
270
  const zs = new Map();
247
271
 
272
+
248
273
  for (const source of this.entries) {
249
274
  for (const domain of source.localDomains) {
250
- const config = new bind_zone_config();
251
-
252
- config.name = `${domain}.zone.conf`;
253
- config.type = this.service.serverType;
275
+ const config = new bind_zone_config(this, `${domain}.zone.conf`);
254
276
 
255
- const z = new bind_zone();
277
+ this.zoneConfigs.push(config);
256
278
 
257
- z.id = domain;
258
- z.source = source;
259
- z.owner = this;
260
- z.config = config;
261
- z.records = new Set(this.defaultRecords);
279
+ const z = new bind_zone(this, domain, config, source);
262
280
 
263
281
  zs.set(z.id, z);
264
282
 
265
- config.zones.push(z);
266
-
267
283
  for (const {
268
284
  address,
269
285
  subnet,