pmcf 6.10.3 → 6.10.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
@@ -77,26 +77,26 @@ generates config packages for:
77
77
  * [domainNames](#domainnames)
78
78
  * [InitializationContext](#initializationcontext)
79
79
  * [Parameters](#parameters-13)
80
+ * [SkeletonNetworkInterface](#skeletonnetworkinterface)
81
+ * [networkAddresses](#networkaddresses)
82
+ * [Parameters](#parameters-14)
80
83
  * [SystemdJournalRemoteService](#systemdjournalremoteservice)
81
84
  * [Properties](#properties)
82
85
  * [systemdConfigs](#systemdconfigs)
83
- * [Parameters](#parameters-14)
86
+ * [Parameters](#parameters-15)
84
87
  * [SystemdJournalUploadService](#systemdjournaluploadservice)
85
88
  * [Properties](#properties-1)
86
89
  * [systemdConfigs](#systemdconfigs-1)
87
- * [Parameters](#parameters-15)
90
+ * [Parameters](#parameters-16)
88
91
  * [NetworkAddress](#networkaddress)
89
- * [Parameters](#parameters-16)
92
+ * [Parameters](#parameters-17)
90
93
  * [subnet](#subnet)
91
94
  * [networkInterface](#networkinterface)
92
95
  * [address](#address)
93
96
  * [addresses](#addresses)
94
- * [Parameters](#parameters-17)
95
- * [cidrAddresses](#cidraddresses)
96
97
  * [Parameters](#parameters-18)
97
- * [SkeletonNetworkInterface](#skeletonnetworkinterface)
98
- * [networkAddresses](#networkaddresses)
99
- * [Parameters](#parameters-19)
98
+ * [cidrAddresses](#cidraddresses)
99
+ * [Parameters](#parameters-19)
100
100
  * [families](#families)
101
101
  * [secretName](#secretname)
102
102
  * [directHosts](#directhosts)
@@ -286,6 +286,18 @@ Keeps track of all in flight object creations and loose ends during config initi
286
286
 
287
287
  * `directory` (optional, default `"/"`)
288
288
 
289
+ ## SkeletonNetworkInterface
290
+
291
+ **Extends ServiceOwner**
292
+
293
+ ### networkAddresses
294
+
295
+ #### Parameters
296
+
297
+ * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
298
+
299
+ Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
300
+
289
301
  ## SystemdJournalRemoteService
290
302
 
291
303
  **Extends CoreService**
@@ -361,18 +373,6 @@ Returns **Iterable<[string](https://developer.mozilla.org/docs/Web/JavaScript/Re
361
373
 
362
374
  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;
363
375
 
364
- ## SkeletonNetworkInterface
365
-
366
- **Extends ServiceOwner**
367
-
368
- ### networkAddresses
369
-
370
- #### Parameters
371
-
372
- * `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `n=>true`)
373
-
374
- Returns **Iterable<[NetworkAddress](#networkaddress)>**&#x20;
375
-
376
376
  ## families
377
377
 
378
378
  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.10.3",
3
+ "version": "6.10.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "aggregated-map": "^1.0.7",
54
54
  "content-entry-transform": "^1.6.9",
55
- "ip-utilties": "^3.7.4",
55
+ "ip-utilties": "^3.7.5",
56
56
  "npm-pkgbuild": "^20.8.2",
57
57
  "pacc": "^10.4.1",
58
58
  "package-directory": "^8.2.0",
@@ -69,7 +69,7 @@ export function addresses(sources, options) {
69
69
  typeof object === "string" ? object : decodeIP(object.address)
70
70
  )
71
71
  )
72
- ];
72
+ ].filter(e=>e!=='');
73
73
  }
74
74
 
75
75
  /**
@@ -134,7 +134,7 @@ class bind_group extends Base {
134
134
  }
135
135
 
136
136
  get defaultRecords() {
137
- const nameService = this.owner; //ss[0];
137
+ const nameService = this.owner;
138
138
 
139
139
  console.log(
140
140
  "nameService",
@@ -372,7 +372,12 @@ class bind_group extends Base {
372
372
  content.push(` type ${config.type};`);
373
373
  content.push(` file \"${zone.file}\";`);
374
374
  content.push(
375
- addressesStatement(" allow-update", this.allowedUpdates, "none;")
375
+ addressesStatement(
376
+ "allow-update",
377
+ this.allowedUpdates,
378
+ "none;",
379
+ " "
380
+ )
376
381
  );
377
382
  content.push(` notify ${yesno(this.notify)};`);
378
383
  }
@@ -403,17 +408,17 @@ class bind_group extends Base {
403
408
  }
404
409
  }
405
410
 
406
- function addressesStatement(prefix, objects, empty = false) {
411
+ function addressesStatement(prefix, objects, empty = false, indent = "") {
407
412
  const body = asArray(objects).map(
408
- value => ` ${typeof value === "string" ? value : value.name};`
413
+ value => `${indent} ${typeof value === "string" ? value : value.name};`
409
414
  );
410
415
 
411
416
  if (body.length) {
412
- return [`${prefix} {`, body, "};"];
417
+ return [`${indent}${prefix} {`, body, `${indent}};`];
413
418
  }
414
419
 
415
420
  if (empty) {
416
- return [`${prefix} {`, empty, "};"];
421
+ return [`${indent}${prefix} {`, indent + " " + empty, `${indent}};`];
417
422
  }
418
423
 
419
424
  return [];