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 +2 -2
- package/src/common-attributes.mjs +7 -0
- package/src/owner.mjs +0 -8
- package/src/service-owner.mjs +4 -13
- package/src/service-types.mjs +7 -7
- package/src/services/kea.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.61.
|
|
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.
|
|
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)
|
package/src/service-owner.mjs
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
}
|
package/src/service-types.mjs
CHANGED
|
@@ -360,19 +360,19 @@ export function serviceTypes(type) {
|
|
|
360
360
|
*/
|
|
361
361
|
export function serviceTypeEndpoints(type, bundeledToo) {
|
|
362
362
|
if (type) {
|
|
363
|
-
const aggregator = (
|
|
364
|
-
|
|
365
|
-
return
|
|
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
|
-
(
|
|
372
|
-
for (const family of asArray(
|
|
373
|
-
|
|
371
|
+
(result, endpoint) => {
|
|
372
|
+
for (const family of asArray(endpoint.family)) {
|
|
373
|
+
result.push({ ...endpoint, family });
|
|
374
374
|
}
|
|
375
|
-
return
|
|
375
|
+
return result;
|
|
376
376
|
},
|
|
377
377
|
bundeledToo ? type.services.reduce(aggregator, []) : []
|
|
378
378
|
)
|
package/src/services/kea.mjs
CHANGED