pmcf 6.22.1 → 6.22.3

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/README.md CHANGED
@@ -78,30 +78,30 @@ generates config packages for:
78
78
  * [domainNames](#domainnames)
79
79
  * [InitializationContext](#initializationcontext)
80
80
  * [Parameters](#parameters-14)
81
- * [SkeletonNetworkInterface](#skeletonnetworkinterface)
82
- * [networkAddresses](#networkaddresses)
83
- * [Parameters](#parameters-15)
84
81
  * [zones](#zones)
85
82
  * [type](#type)
86
83
  * [addressesStatement](#addressesstatement)
87
- * [Parameters](#parameters-16)
84
+ * [Parameters](#parameters-15)
88
85
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
89
86
  * [Properties](#properties)
90
87
  * [systemdConfigs](#systemdconfigs)
91
- * [Parameters](#parameters-17)
88
+ * [Parameters](#parameters-16)
92
89
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
93
90
  * [Properties](#properties-1)
94
91
  * [systemdConfigs](#systemdconfigs-1)
95
- * [Parameters](#parameters-18)
92
+ * [Parameters](#parameters-17)
96
93
  * [NetworkAddress](#networkaddress)
97
- * [Parameters](#parameters-19)
94
+ * [Parameters](#parameters-18)
98
95
  * [subnet](#subnet)
99
96
  * [networkInterface](#networkinterface)
100
97
  * [address](#address)
101
98
  * [addresses](#addresses)
102
- * [Parameters](#parameters-20)
99
+ * [Parameters](#parameters-19)
103
100
  * [cidrAddresses](#cidraddresses)
104
- * [Parameters](#parameters-21)
101
+ * [Parameters](#parameters-20)
102
+ * [SkeletonNetworkInterface](#skeletonnetworkinterface)
103
+ * [networkAddresses](#networkaddresses)
104
+ * [Parameters](#parameters-21)
105
105
  * [families](#families)
106
106
  * [secretName](#secretname)
107
107
  * [directHosts](#directhosts)
@@ -296,18 +296,6 @@ Keeps track of all in flight object creations and loose ends during config initi
296
296
 
297
297
  * `directory` (optional, default `"/"`)
298
298
 
299
- ## SkeletonNetworkInterface
300
-
301
- **Extends ServiceOwner**
302
-
303
- ### networkAddresses
304
-
305
- #### Parameters
306
-
307
- * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
308
-
309
- Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
310
-
311
299
  ## zones
312
300
 
313
301
  Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<bind\_zone>
@@ -404,6 +392,18 @@ Returns **Iterable<[string](https://developer.mozilla.org/docs/Web/JavaScript/Re
404
392
 
405
393
  Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
406
394
 
395
+ ## SkeletonNetworkInterface
396
+
397
+ **Extends ServiceOwner**
398
+
399
+ ### networkAddresses
400
+
401
+ #### Parameters
402
+
403
+ * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
404
+
405
+ Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
406
+
407
407
  ## families
408
408
 
409
409
  Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.22.1",
3
+ "version": "6.22.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -3,10 +3,8 @@ import {
3
3
  string_attribute_writable,
4
4
  number_attribute_writable,
5
5
  string_set_attribute,
6
- default_collection_attribute_writable,
7
6
  boolean_attribute_false,
8
7
  port_attribute_writable,
9
- type_attribute_writable,
10
8
  priority_attribute
11
9
  } from "pacc";
12
10
  import {
@@ -45,7 +43,6 @@ export const endpointAttributes = {
45
43
  name: "protocol",
46
44
  values: new Set(["tcp", "udp", "quic"])
47
45
  },
48
- type: type_attribute_writable,
49
46
  types: { ...string_set_attribute, name: "types" },
50
47
  tls: { ...boolean_attribute_false, name: "tls" }
51
48
  };
@@ -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
  }