pmcf 6.68.14 → 6.68.15

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.68.14",
3
+ "version": "6.68.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,7 @@
54
54
  "content-entry-transform": "^1.7.11",
55
55
  "filtered-map": "^1.0.0",
56
56
  "ip-utilties": "^3.13.1",
57
- "npm-pkgbuild": "^22.2.18",
57
+ "npm-pkgbuild": "^22.2.19",
58
58
  "pacc": "^14.3.0",
59
59
  "package-directory": "^8.2.0",
60
60
  "yaml": "^2.9.1"
@@ -1,5 +1,5 @@
1
1
  import { join } from "node:path";
2
- import { default_collection_attribute_writable, asArray } from "pacc";
2
+ import { default_collection_attribute_writable, leafValues, asArray } from "pacc";
3
3
  import { addType, CoreService } from "pmcf";
4
4
  import { writeLines } from "../utils.mjs";
5
5
  import { FAMILY_UNIX, FAMILY_IPV4_IPV6, PROTOCOL_TCP } from "../constants.mjs";
@@ -41,7 +41,7 @@ export class chrony extends CoreService {
41
41
 
42
42
  async *preparePackages(dir) {
43
43
  const packageData = await this.preparePackage(dir);
44
- const subnets = [...new Map(this.subnets).values()]; // TODO should be normal
44
+ const addresses = [...new Set(leafValues(this.subnets).map(s=>s.address))];
45
45
  const host = this.host;
46
46
 
47
47
  function chronyServer(endpoint) {
@@ -74,9 +74,9 @@ export class chrony extends CoreService {
74
74
  "ntsdumpdir /var/lib/chrony",
75
75
  "dumpdir /var/lib/chrony",
76
76
  "pidfile /run/chrony/chronyd.pid",
77
- subnets.map(s => `allow ${s.address}`),
77
+ addresses.map(address => `allow ${address}`),
78
78
  "cmdratelimit interval -4 burst 16",
79
- subnets.map(s => `cmdallow ${s.address}`)
79
+ addresses.map(address => `cmdallow ${address}`)
80
80
  ];
81
81
 
82
82
  await writeLines(join(dir, "etc"), "chrony.conf", lines);