pmcf 6.61.3 → 6.61.5

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.61.3",
3
+ "version": "6.61.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -55,7 +55,7 @@
55
55
  "filtered-map": "^1.0.0",
56
56
  "ip-utilties": "^3.13.1",
57
57
  "npm-pkgbuild": "^22.2.7",
58
- "pacc": "^11.17.1",
58
+ "pacc": "^11.17.2",
59
59
  "package-directory": "^8.2.0",
60
60
  "yaml": "^2.9.1"
61
61
  },
@@ -70,6 +70,13 @@ export const owners_attribute = {
70
70
  backpointer: owner_attribute
71
71
  };
72
72
 
73
+ export const services_attribute = {
74
+ ...default_collection_attribute_writable,
75
+ name: "services",
76
+ type: "service",
77
+ backpointer: owner_attribute
78
+ };
79
+
73
80
  export const cluster_attribute = {
74
81
  ...default_attribute_writable,
75
82
  name: "cluster",
package/src/owner.mjs CHANGED
@@ -71,10 +71,6 @@ export class owner extends ServiceOwner {
71
71
  );
72
72
  }
73
73
 
74
- set hosts(value) {
75
- this._hosts = value;
76
- }
77
-
78
74
  get clusters() {
79
75
  return new FilteredMap(this.hosts, host => host.isCluster);
80
76
  }
@@ -85,10 +81,6 @@ export class owner extends ServiceOwner {
85
81
  );
86
82
  }
87
83
 
88
- set networks(value) {
89
- this._networks = value;
90
- }
91
-
92
84
  get services() {
93
85
  return new AggregatedMap(
94
86
  [this, ...this.hosts.values()].map(host => host._services)
@@ -1,18 +1,13 @@
1
- import { default_collection_attribute_writable } from "pacc";
2
- import { base, addType } from "pmcf";
3
- import { owner_attribute } from "./common-attributes.mjs";
1
+ import { base } from "./base.mjs";
2
+ import { addType } from "./type.mjs";
3
+ import { services_attribute } from "./common-attributes.mjs";
4
4
 
5
5
  export class ServiceOwner extends base {
6
6
  static name = "service-owner";
7
7
  static priority = 1.9;
8
8
  static owners = ["owner", "site", "network", "root"];
9
9
  static attributes = {
10
- services: {
11
- ...default_collection_attribute_writable,
12
- name: "services",
13
- type: "service",
14
- backpointer: owner_attribute
15
- }
10
+ services: services_attribute
16
11
  };
17
12
 
18
13
  static {
@@ -21,10 +16,6 @@ export class ServiceOwner extends base {
21
16
 
22
17
  _services = new Map();
23
18
 
24
- set services(value) {
25
- this._services = value;
26
- }
27
-
28
19
  get services() {
29
20
  return this._services;
30
21
  }
@@ -360,19 +360,19 @@ export function serviceTypes(type) {
360
360
  */
361
361
  export function serviceTypeEndpoints(type, bundeledToo) {
362
362
  if (type) {
363
- const aggregator = (acc, type) => {
364
- acc.push(...serviceTypeEndpoints(type, bundeledToo));
365
- return acc;
363
+ const aggregator = (result, type) => {
364
+ result.push(...serviceTypeEndpoints(type, bundeledToo));
365
+ return result;
366
366
  };
367
367
 
368
368
  return type.extends.reduce(
369
369
  aggregator,
370
370
  type.endpoints.reduce(
371
- (acc, ep) => {
372
- for (const family of asArray(ep.family)) {
373
- acc.push({ ...ep, family });
371
+ (result, endpoint) => {
372
+ for (const family of asArray(endpoint.family)) {
373
+ result.push({ ...endpoint, family });
374
374
  }
375
- return acc;
375
+ return result;
376
376
  },
377
377
  bundeledToo ? type.services.reduce(aggregator, []) : []
378
378
  )
@@ -377,7 +377,7 @@ export class kea extends CoreService {
377
377
  algorithm: key.algorithm,
378
378
  "secret-file": systemdCredentialFileName(
379
379
  "kea-dhcp-ddns.service",
380
- `key.${key.name}.tsig`
380
+ `kea.${key.name}.tsig`
381
381
  )
382
382
  };
383
383
  }),