pmcf 6.22.2 → 6.22.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.22.2",
3
+ "version": "6.22.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "aggregated-map": "^1.0.10",
54
54
  "content-entry-transform": "^1.7.0",
55
- "ip-utilties": "^3.10.1",
55
+ "ip-utilties": "^3.11.0",
56
56
  "npm-pkgbuild": "^20.8.13",
57
57
  "pacc": "^11.1.2",
58
58
  "package-directory": "^8.2.0",
@@ -95,9 +95,7 @@ export class CoreService extends Base {
95
95
  }
96
96
 
97
97
  get host() {
98
- if (this.owner instanceof Host) {
99
- return this.owner;
100
- }
98
+ return this.owner.host;
101
99
  }
102
100
 
103
101
  get hosts() {
@@ -46,7 +46,11 @@ class bind_zone extends Base {
46
46
  static attributes = {
47
47
  id: { ...name_attribute, name: "id" },
48
48
  file: { ...string_attribute, name: "file" },
49
- records: { ...string_attribute_writable, collection: true, name: "records" },
49
+ records: {
50
+ ...string_attribute_writable,
51
+ collection: true,
52
+ name: "records"
53
+ },
50
54
  foreign: { ...boolean_attribute, name: "foreign" }
51
55
  };
52
56
 
@@ -138,7 +142,9 @@ class bind_zone_config extends Base {
138
142
  const dir = outputControl.dir;
139
143
  const group = this.owner;
140
144
 
141
- console.log(`config: ${group.name}/${this.name}${this.foreign ? " foreign" : ""}`);
145
+ console.log(
146
+ `config: ${group.name}/${this.name}${this.foreign ? " foreign" : ""}`
147
+ );
142
148
 
143
149
  const content = [];
144
150
 
@@ -394,14 +400,16 @@ class bind_group extends Base {
394
400
  )
395
401
  );
396
402
 
397
- const reverseZone = this._zones.getOrInsertComputed(
398
- reverseArpa(na.subnet.prefix),
399
- domain =>
400
- this.intoCatalog(
401
- new bind_zone(this, domain, config, locationName),
402
- locationName
403
- )
404
- );
403
+ const reverseZone =
404
+ this.hasReverse && na.subnet.prefix &&
405
+ this._zones.getOrInsertComputed(
406
+ reverseArpa(na.subnet.prefix),
407
+ domain =>
408
+ this.intoCatalog(
409
+ new bind_zone(this, domain, config, locationName),
410
+ locationName
411
+ )
412
+ );
405
413
 
406
414
  if (host && !hosts.has(host)) {
407
415
  hosts.add(host);
@@ -480,13 +488,15 @@ class bind_group extends Base {
480
488
  )
481
489
  );
482
490
 
483
- reverseZone.records.add(
484
- DNSRecord(
485
- dnsFullName(reverseArpa(address)),
486
- "PTR",
487
- dnsFullName(domainName)
488
- )
489
- );
491
+ if (reverseZone) {
492
+ reverseZone.records.add(
493
+ DNSRecord(
494
+ dnsFullName(reverseArpa(address)),
495
+ "PTR",
496
+ dnsFullName(domainName)
497
+ )
498
+ );
499
+ }
490
500
  }
491
501
  }
492
502
  }