pmcf 6.40.2 → 6.40.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/README.md CHANGED
@@ -82,29 +82,29 @@ generates config packages for:
82
82
  * [domainNames](#domainnames)
83
83
  * [InitializationContext](#initializationcontext)
84
84
  * [Parameters](#parameters-14)
85
+ * [SkeletonNetworkInterface](#skeletonnetworkinterface)
86
+ * [networkAddresses](#networkaddresses)
87
+ * [Parameters](#parameters-15)
85
88
  * [zones](#zones)
86
89
  * [addressesStatement](#addressesstatement)
87
- * [Parameters](#parameters-15)
90
+ * [Parameters](#parameters-16)
88
91
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
89
92
  * [Properties](#properties)
90
93
  * [systemdConfigs](#systemdconfigs)
91
- * [Parameters](#parameters-16)
94
+ * [Parameters](#parameters-17)
92
95
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
93
96
  * [Properties](#properties-1)
94
97
  * [systemdConfigs](#systemdconfigs-1)
95
- * [Parameters](#parameters-17)
98
+ * [Parameters](#parameters-18)
96
99
  * [NetworkAddress](#networkaddress)
97
- * [Parameters](#parameters-18)
100
+ * [Parameters](#parameters-19)
98
101
  * [subnet](#subnet)
99
102
  * [networkInterface](#networkinterface)
100
103
  * [address](#address)
101
104
  * [addresses](#addresses)
102
- * [Parameters](#parameters-19)
103
- * [cidrAddresses](#cidraddresses)
104
105
  * [Parameters](#parameters-20)
105
- * [SkeletonNetworkInterface](#skeletonnetworkinterface)
106
- * [networkAddresses](#networkaddresses)
107
- * [Parameters](#parameters-21)
106
+ * [cidrAddresses](#cidraddresses)
107
+ * [Parameters](#parameters-21)
108
108
  * [families](#families)
109
109
  * [secretName](#secretname)
110
110
  * [directHosts](#directhosts)
@@ -309,6 +309,18 @@ Keeps track of all in flight object creations and loose ends during config initi
309
309
 
310
310
  * `directory` (optional, default `"/"`)
311
311
 
312
+ ## SkeletonNetworkInterface
313
+
314
+ **Extends ServiceOwner**
315
+
316
+ ### networkAddresses
317
+
318
+ #### Parameters
319
+
320
+ * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
321
+
322
+ Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
323
+
312
324
  ## zones
313
325
 
314
326
  Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<bind\_zone>
@@ -399,18 +411,6 @@ Returns **Iterable<[string](https://developer.mozilla.org/docs/Web/JavaScript/Re
399
411
 
400
412
  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;
401
413
 
402
- ## SkeletonNetworkInterface
403
-
404
- **Extends ServiceOwner**
405
-
406
- ### networkAddresses
407
-
408
- #### Parameters
409
-
410
- * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
411
-
412
- Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
413
-
414
414
  ## families
415
415
 
416
416
  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.40.2",
3
+ "version": "6.40.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -208,15 +208,24 @@ export class base extends core {
208
208
  return this.constructor.name;
209
209
  }
210
210
 
211
- get packageData() {
212
- if (!this.content) {
211
+ set content(value) {
212
+ this._content = value;
213
+ }
214
+
215
+ get content() {
216
+ if (!this._content) {
213
217
  for (const e of this.walkDirections(["extends"])) {
214
- if (e.content) {
215
- this.content = e.content.forOwner(this);
218
+ if (e._content) {
219
+ this._content = e._content.forOwner(this);
216
220
  break;
217
221
  }
218
222
  }
219
223
  }
224
+
225
+ return this._content;
226
+ }
227
+
228
+ get packageData() {
220
229
  return this.content?.packageData();
221
230
  }
222
231
 
package/src/cluster.mjs CHANGED
@@ -45,6 +45,11 @@ export class Cluster extends Host {
45
45
  routerId = 100;
46
46
  checkInterval = 60;
47
47
 
48
+ get content()
49
+ {
50
+ return this.masters.map(m=>m.host)[0]?.content;
51
+ }
52
+
48
53
  get members() {
49
54
  return new Set(this.masters).union(new Set(this.backups));
50
55
  }
package/src/content.mjs CHANGED
@@ -154,14 +154,13 @@ export class content extends core {
154
154
 
155
155
  get packaging() {
156
156
  const all = this.unionFromDirections(["this", "extends"], "_packaging");
157
- if(all.size) {
158
- return all;
159
- }
160
-
161
- const content = this.host?.content;
162
- if(content && content !== this) {
163
- return content.packaging;
157
+ if (all.size === 0) {
158
+ const content = this.host.content;
159
+ if (content && content !== this) {
160
+ return content.packaging;
161
+ }
164
162
  }
163
+ return all;
165
164
  }
166
165
 
167
166
  get outputs() {