pmcf 6.21.4 → 6.21.6

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)
81
84
  * [zones](#zones)
82
85
  * [type](#type)
83
86
  * [addressesStatement](#addressesstatement)
84
- * [Parameters](#parameters-15)
87
+ * [Parameters](#parameters-16)
85
88
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
86
89
  * [Properties](#properties)
87
90
  * [systemdConfigs](#systemdconfigs)
88
- * [Parameters](#parameters-16)
91
+ * [Parameters](#parameters-17)
89
92
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
90
93
  * [Properties](#properties-1)
91
94
  * [systemdConfigs](#systemdconfigs-1)
92
- * [Parameters](#parameters-17)
95
+ * [Parameters](#parameters-18)
93
96
  * [NetworkAddress](#networkaddress)
94
- * [Parameters](#parameters-18)
97
+ * [Parameters](#parameters-19)
95
98
  * [subnet](#subnet)
96
99
  * [networkInterface](#networkinterface)
97
100
  * [address](#address)
98
101
  * [addresses](#addresses)
99
- * [Parameters](#parameters-19)
100
- * [cidrAddresses](#cidraddresses)
101
102
  * [Parameters](#parameters-20)
102
- * [SkeletonNetworkInterface](#skeletonnetworkinterface)
103
- * [networkAddresses](#networkaddresses)
104
- * [Parameters](#parameters-21)
103
+ * [cidrAddresses](#cidraddresses)
104
+ * [Parameters](#parameters-21)
105
105
  * [families](#families)
106
106
  * [secretName](#secretname)
107
107
  * [directHosts](#directhosts)
@@ -296,6 +296,18 @@ 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
+
299
311
  ## zones
300
312
 
301
313
  Type: [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<bind\_zone>
@@ -392,18 +404,6 @@ Returns **Iterable<[string](https://developer.mozilla.org/docs/Web/JavaScript/Re
392
404
 
393
405
  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;
394
406
 
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.21.4",
3
+ "version": "6.21.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,7 @@
54
54
  "content-entry-transform": "^1.7.0",
55
55
  "ip-utilties": "^3.10.1",
56
56
  "npm-pkgbuild": "^20.8.13",
57
- "pacc": "^11.0.3",
57
+ "pacc": "^11.1.0",
58
58
  "package-directory": "^8.2.0",
59
59
  "yaml": "^2.9.0"
60
60
  },
package/src/base.mjs CHANGED
@@ -112,14 +112,14 @@ export class Base {
112
112
  this.constructor,
113
113
  attribute => attribute.collection && !attribute.type.primitive
114
114
  )) {
115
- const collection = this[path];
115
+ const collection = this[attribute.name];
116
116
  if (typeof collection?.get === "function") {
117
117
  for (const [name, extending] of this.mapFromDirections(
118
118
  ["extends"],
119
- path
119
+ attribute.name
120
120
  )) {
121
121
  const present = collection.get(extending.name);
122
-
122
+ //console.log("ME",this.fullName,attribute.name,extending.name);
123
123
  if (present) {
124
124
  present.extends.add(extending);
125
125
  present.materializeExtends();
@@ -128,6 +128,25 @@ export class Base {
128
128
  }
129
129
  }
130
130
  }
131
+ /*
132
+ else {
133
+ if (collection instanceof Set) {
134
+ for (const all of this.unionFromDirections(["extends"], attribute.name)) {
135
+ if (all instanceof Set) {
136
+ const d = collection.difference(all);
137
+
138
+ // if (d.size) {
139
+ console.log("ME", this.fullName, attribute.name, d);
140
+ // }
141
+ }
142
+ else {
143
+ // console.error("NO SET",this.fullName, attribute.name, typeof all, all.constructor.name);
144
+ }
145
+ }
146
+ } else {
147
+ //console.log("NO MAP OR SET", this.fullName, name);
148
+ }
149
+ }*/
131
150
  }
132
151
  }
133
152
 
@@ -20,7 +20,7 @@ import {
20
20
  FAMILY_UNIX,
21
21
  FAMILY_DNS
22
22
  } from "pmcf";
23
- import { asArray, union } from "./utils.mjs";
23
+ import { asArray } from "./utils.mjs";
24
24
  import { networkAddressAttributes } from "./common-attributes.mjs";
25
25
  import {
26
26
  serviceTypeEndpoints,
@@ -555,7 +555,7 @@ class bind_group extends Base {
555
555
  * @param {any} objects
556
556
  * @param {boolean|string} empty
557
557
  * @param {string} indent
558
- * @returns {string[]}
558
+ * @returns {(string|string[])[]}
559
559
  */
560
560
  function addressesStatement(prefix, objects, empty = false, indent = "") {
561
561
  const body = asArray(objects).map(