pmcf 6.49.15 → 6.49.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.49.15",
3
+ "version": "6.49.17",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,6 +1,5 @@
1
1
  import { join } from "node:path";
2
- import { FileContentProvider } from "npm-pkgbuild";
3
- import { default_collection_attribute_writable } from "pacc";
2
+ import { default_collection_attribute_writable, asArray } from "pacc";
4
3
  import { addType, FAMILY_UNIX, FAMILY_IPV4_IPV6, CoreService } from "pmcf";
5
4
  import { writeLines } from "../utils.mjs";
6
5
 
@@ -11,12 +10,6 @@ export class chrony extends CoreService {
11
10
  type: "endpoint",
12
11
  name: "servers",
13
12
  deferredExpression: true
14
- },
15
- peers: {
16
- ...default_collection_attribute_writable,
17
- type: "endpoint",
18
- name: "peers",
19
- deferredExpression: true
20
13
  }
21
14
  };
22
15
 
@@ -68,9 +61,7 @@ export class chrony extends CoreService {
68
61
  }
69
62
 
70
63
  const lines = [
71
- this.servers.flat().map(chronyServer),
72
- this.peers
73
- .flat()
64
+ asArray(this.servers)
74
65
  .filter(endpoint => !endpoint.service.host.isMember(host))
75
66
  .map(chronyServer),
76
67
  `mailonchange ${this.administratorEmail} 0.5`,
@@ -12,7 +12,8 @@ import {
12
12
  number_attribute_writable,
13
13
  boolean_attribute_writable_true,
14
14
  default_collection_attribute_writable,
15
- extendingAttributeIterator
15
+ extendingAttributeIterator,
16
+ asArray
16
17
  } from "pacc";
17
18
  import {
18
19
  addType,
@@ -249,7 +250,7 @@ export class kea extends CoreService {
249
250
  "http-listener-threads": 2,
250
251
  "http-client-threads": 2
251
252
  },*/
252
- peers: peers
253
+ peers: asArray(peers)
253
254
  .sort(sortDescendingByPriority)
254
255
  .reduce((a, kea) => {
255
256
  if (!kea.host.isCluster) {
@@ -284,14 +285,15 @@ export class kea extends CoreService {
284
285
  "option-data": [
285
286
  {
286
287
  name: family == 4 ? "domain-name-servers" : "dns-servers",
287
- data: dnsServerEndpoints
288
- .filter(
289
- endpoint =>
290
- endpoint.family === `IPv${family}` &&
291
- addressType(endpoint.address) !== ADDRESS_TYPE_LOOPBACK
292
- )
293
- .map(endpoint => endpoint.address)
294
- .join(",")
288
+ data: asArray(
289
+ dnsServerEndpoints
290
+ .filter(
291
+ endpoint =>
292
+ endpoint.family === `IPv${family}` &&
293
+ addressType(endpoint.address) !== ADDRESS_TYPE_LOOPBACK
294
+ )
295
+ .map(endpoint => endpoint.address)
296
+ ).join(",")
295
297
  },
296
298
  {
297
299
  name: "domain-search",