pmcf 4.22.0 → 4.22.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/README.md CHANGED
@@ -43,70 +43,72 @@ generates config packages for:
43
43
 
44
44
  * [Base](#base)
45
45
  * [Parameters](#parameters)
46
- * [walkDirections](#walkdirections)
46
+ * [unionFromDirections](#unionfromdirections)
47
47
  * [Parameters](#parameters-1)
48
- * [extendedAttribute](#extendedattribute)
48
+ * [walkDirections](#walkdirections)
49
49
  * [Parameters](#parameters-2)
50
- * [propertyIterator](#propertyiterator)
50
+ * [extendedAttribute](#extendedattribute)
51
51
  * [Parameters](#parameters-3)
52
- * [getProperties](#getproperties)
52
+ * [propertyIterator](#propertyiterator)
53
53
  * [Parameters](#parameters-4)
54
+ * [getProperties](#getproperties)
55
+ * [Parameters](#parameters-5)
54
56
  * [priority](#priority)
55
57
  * [expression](#expression)
56
- * [Parameters](#parameters-5)
57
- * [templateContent](#templatecontent)
58
58
  * [Parameters](#parameters-6)
59
+ * [templateContent](#templatecontent)
60
+ * [Parameters](#parameters-7)
59
61
  * [isTemplate](#istemplate)
60
62
  * [property](#property)
61
- * [Parameters](#parameters-7)
62
- * [expand](#expand)
63
63
  * [Parameters](#parameters-8)
64
+ * [expand](#expand)
65
+ * [Parameters](#parameters-9)
64
66
  * [PortEndpoint](#portendpoint)
65
- * [Parameters](#parameters-9)
67
+ * [Parameters](#parameters-10)
66
68
  * [port](#port)
67
69
  * [socketAddress](#socketaddress)
68
70
  * [HTTPEndpoint](#httpendpoint)
69
- * [Parameters](#parameters-10)
71
+ * [Parameters](#parameters-11)
70
72
  * [port](#port-1)
71
73
  * [id](#id)
72
74
  * [SkeletonNetworkInterface](#skeletonnetworkinterface)
73
75
  * [networkAddresses](#networkaddresses)
74
- * [Parameters](#parameters-11)
76
+ * [Parameters](#parameters-12)
75
77
  * [InitializationContext](#initializationcontext)
76
- * [Parameters](#parameters-12)
78
+ * [Parameters](#parameters-13)
77
79
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
78
80
  * [Properties](#properties)
79
81
  * [systemdConfigs](#systemdconfigs)
80
- * [Parameters](#parameters-13)
82
+ * [Parameters](#parameters-14)
81
83
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
82
84
  * [Properties](#properties-1)
83
85
  * [systemdConfigs](#systemdconfigs-1)
84
- * [Parameters](#parameters-14)
86
+ * [Parameters](#parameters-15)
85
87
  * [NetworkAddress](#networkaddress)
86
- * [Parameters](#parameters-15)
88
+ * [Parameters](#parameters-16)
87
89
  * [subnet](#subnet)
88
90
  * [networkInterface](#networkinterface)
89
91
  * [address](#address)
90
92
  * [addresses](#addresses)
91
- * [Parameters](#parameters-16)
92
- * [cidrAddresses](#cidraddresses)
93
93
  * [Parameters](#parameters-17)
94
+ * [cidrAddresses](#cidraddresses)
95
+ * [Parameters](#parameters-18)
94
96
  * [secretName](#secretname)
95
97
  * [isTemplate](#istemplate-1)
96
98
  * [named](#named)
97
- * [Parameters](#parameters-18)
98
- * [serviceEndpoints](#serviceendpoints)
99
99
  * [Parameters](#parameters-19)
100
- * [domainName](#domainname)
100
+ * [serviceEndpoints](#serviceendpoints)
101
101
  * [Parameters](#parameters-20)
102
- * [domainFromDominName](#domainfromdominname)
102
+ * [domainName](#domainname)
103
103
  * [Parameters](#parameters-21)
104
- * [sectionLines](#sectionlines)
104
+ * [domainFromDominName](#domainfromdominname)
105
105
  * [Parameters](#parameters-22)
106
- * [asArray](#asarray)
106
+ * [sectionLines](#sectionlines)
107
107
  * [Parameters](#parameters-23)
108
- * [asIterator](#asiterator)
108
+ * [asArray](#asarray)
109
109
  * [Parameters](#parameters-24)
110
+ * [asIterator](#asiterator)
111
+ * [Parameters](#parameters-25)
110
112
 
111
113
  ## Base
112
114
 
@@ -118,6 +120,17 @@ properties: use defined values to support attribute value definitions
118
120
  * `owner` **[Base](#base)** 
119
121
  * `data` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
120
122
 
123
+ ### unionFromDirections
124
+
125
+ Deliver union set of all property values.
126
+
127
+ #### Parameters
128
+
129
+ * `directions` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** (optional, default `["this","extends","owner"]`)
130
+ * `property` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
131
+
132
+ Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)\<any>**&#x20;
133
+
121
134
  ### walkDirections
122
135
 
123
136
  Walk the object graph in some directions and deliver seen nodes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "4.22.0",
3
+ "version": "4.22.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -127,7 +127,13 @@ export class Base {
127
127
  return this.owner.addObject(object);
128
128
  }
129
129
 
130
- collectFromDirections(directions = ["this", "extends", "owner"], property) {
130
+ /**
131
+ * Deliver union set of all property values.
132
+ * @param {string[]} directions
133
+ * @param {string} property
134
+ * @returns {Set<any>}
135
+ */
136
+ unionFromDirections(directions, property) {
131
137
  let collected = new Set();
132
138
  for (const node of this.walkDirections(directions)) {
133
139
  collected = collected.union(node[property]);
@@ -423,7 +429,7 @@ export class Base {
423
429
  }
424
430
 
425
431
  get tags() {
426
- return this.collectFromDirections(["this", "extends"], "_tags");
432
+ return this.unionFromDirections(["this", "extends"], "_tags");
427
433
  }
428
434
 
429
435
  set tags(value) {
package/src/host.mjs CHANGED
@@ -193,7 +193,7 @@ export class Host extends ServiceOwner {
193
193
 
194
194
  get derivedPackaging() {
195
195
  return this.expand(
196
- this.collectFromDirections(["this", "extends"], "_packaging")
196
+ this.unionFromDirections(["this", "extends"], "_packaging")
197
197
  );
198
198
  }
199
199
 
@@ -219,7 +219,7 @@ export class Host extends ServiceOwner {
219
219
 
220
220
  get aliases() {
221
221
  return this.expand(
222
- this.collectFromDirections(["this", "extends"], "_aliases")
222
+ this.unionFromDirections(["this", "extends"], "_aliases")
223
223
  );
224
224
  }
225
225
 
@@ -229,7 +229,7 @@ export class Host extends ServiceOwner {
229
229
 
230
230
  get provides() {
231
231
  return this.expand(
232
- this.collectFromDirections(["this", "extends"], "_provides")
232
+ this.unionFromDirections(["this", "extends"], "_provides")
233
233
  );
234
234
  }
235
235
 
@@ -239,7 +239,7 @@ export class Host extends ServiceOwner {
239
239
 
240
240
  get replaces() {
241
241
  return this.expand(
242
- this.collectFromDirections(["this", "extends"], "_replaces")
242
+ this.unionFromDirections(["this", "extends"], "_replaces")
243
243
  );
244
244
  }
245
245
 
@@ -249,7 +249,7 @@ export class Host extends ServiceOwner {
249
249
 
250
250
  get depends() {
251
251
  return this.expand(
252
- this.collectFromDirections(["this", "extends"], "_depends")
252
+ this.unionFromDirections(["this", "extends"], "_depends")
253
253
  );
254
254
  }
255
255