pmcf 6.71.0 → 6.71.2

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.71.0",
3
+ "version": "6.71.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,14 +54,14 @@
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.20",
57
+ "npm-pkgbuild": "^22.2.22",
58
58
  "pacc": "^14.4.0",
59
59
  "package-directory": "^8.2.0",
60
60
  "yaml": "^2.9.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "^26.6.5",
64
- "ava": "^8.0.1",
64
+ "ava": "^8.0.2",
65
65
  "c8": "^12.0.0",
66
66
  "documentation": "^14.0.3",
67
67
  "semantic-release": "^25.0.9"
package/src/host.mjs CHANGED
@@ -142,6 +142,14 @@ export class host extends ServiceOwner {
142
142
  ]);
143
143
  }
144
144
 
145
+ get descendantServices() {
146
+ return new AggregatedMap([
147
+ ...[...this.networkInterfaces.values()]
148
+ .filter(ni => ni._services.size > 0)
149
+ .map(ni => ni._services)
150
+ ]);
151
+ }
152
+
145
153
  get foreignDomainNames() {
146
154
  return [...this.aliases].filter(n => n.split(".").length > 1);
147
155
  }
package/src/owner.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import { normalizeCIDR, familyIP, FAMILY_IPV4 } from "ip-utilties";
2
- import { FileContentProvider } from "npm-pkgbuild";
3
2
  import { AggregatedMap } from "aggregated-map";
4
3
  import { FilteredMap } from "filtered-map";
5
4
  import {
@@ -20,7 +19,6 @@ import {
20
19
  networkInterfaces_attribute
21
20
  } from "./common-attributes.mjs";
22
21
  import { addType, assign } from "./type.mjs";
23
- import { loadHooks } from "./hooks.mjs";
24
22
 
25
23
  export class owner extends ServiceOwner {
26
24
  static priority = 2;
@@ -92,6 +90,12 @@ export class owner extends ServiceOwner {
92
90
  );
93
91
  }
94
92
 
93
+ get descendantServices() {
94
+ return new AggregatedMap(
95
+ [this, ...this.hosts.values()].map(host => host.descendantOrDirectServices)
96
+ );
97
+ }
98
+
95
99
  get network() {
96
100
  return [...this.networks.values()][0] || super.network;
97
101
  }
@@ -251,31 +255,4 @@ export class owner extends ServiceOwner {
251
255
 
252
256
  return architectures;
253
257
  }
254
-
255
- async *preparePackages(dir) {
256
- const packageData = {
257
- sources: [
258
- new FileContentProvider(dir + "/"),
259
- new FileContentProvider(
260
- { dir: this.directory, pattern: "location.json" },
261
- { destination: "/etc/location/location.json" }
262
- )
263
- ],
264
- outputs: this.outputs,
265
- properties: {
266
- name: `${this.typeName}-${this.name}`,
267
- description: `${this.typeName} definitions for ${this.fullName}`,
268
- access: "private",
269
- dependencies: { jq: ">=1.6" },
270
- provides: ["location"]
271
- }
272
- };
273
-
274
- await loadHooks(
275
- packageData,
276
- new URL("location.install", import.meta.url).pathname
277
- );
278
-
279
- yield packageData;
280
- }
281
258
  }
@@ -1,3 +1,4 @@
1
+ import { AggregatedMap } from "aggregated-map";
1
2
  import { base } from "./base.mjs";
2
3
  import { addType } from "./type.mjs";
3
4
  import { services_attribute } from "./common-attributes.mjs";
@@ -19,4 +20,16 @@ export class ServiceOwner extends base {
19
20
  get services() {
20
21
  return this._services;
21
22
  }
23
+
24
+ get descendantServices() {
25
+ return new Map();
26
+ }
27
+
28
+ get directServices() {
29
+ return this._services;
30
+ }
31
+
32
+ get descendantOrDirectServices() {
33
+ return new AggregatedMap([this.directServices, this.descendantServices]);
34
+ }
22
35
  }