pmcf 4.18.12 → 4.18.13
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 +1 -1
- package/src/base.mjs +3 -2
- package/src/host.mjs +3 -3
- package/src/network-interfaces/skeleton.mjs +3 -2
- package/src/network.mjs +2 -2
- package/src/owner.mjs +8 -8
- package/src/service.mjs +3 -2
- package/types/host.d.mts +1 -1
- package/types/network-interfaces/skeleton.d.mts +1 -1
- package/types/owner.d.mts +1 -1
- package/types/service.d.mts +1 -1
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -572,11 +572,12 @@ export class Base {
|
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
get packageData() {
|
|
575
|
+
const nameParts = [this.typeName, this.owner?.name, this.name];
|
|
575
576
|
return {
|
|
576
577
|
sources: [],
|
|
577
578
|
outputs: this.outputs,
|
|
578
579
|
properties: {
|
|
579
|
-
name:
|
|
580
|
+
name: nameParts.filter(n => n !== undefined && n.length > 0).join("-"),
|
|
580
581
|
access: "private",
|
|
581
582
|
dependencies: this.depends,
|
|
582
583
|
groups: [this.typeName]
|
|
@@ -751,7 +752,7 @@ export function extractFrom(
|
|
|
751
752
|
}
|
|
752
753
|
|
|
753
754
|
if (typeof object[Symbol.iterator] === "function") {
|
|
754
|
-
object = [...object].map(o => o instanceof Base ? extractFrom(o) : o);
|
|
755
|
+
object = [...object].map(o => (o instanceof Base ? extractFrom(o) : o));
|
|
755
756
|
|
|
756
757
|
if (object.length === 0) {
|
|
757
758
|
return undefined;
|
package/src/host.mjs
CHANGED
|
@@ -327,8 +327,8 @@ export class Host extends ServiceOwner {
|
|
|
327
327
|
return this;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
get hosts() {
|
|
331
|
+
return [this];
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
typeNamed(typeName, name) {
|
|
@@ -449,7 +449,7 @@ export class Host extends ServiceOwner {
|
|
|
449
449
|
await writeLines(dir, "etc/vconsole.conf", `KEYMAP=${this.keymap}`);
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
await generateKnownHosts(this.owner.hosts
|
|
452
|
+
await generateKnownHosts(this.owner.hosts, join(dir, "root", ".ssh"));
|
|
453
453
|
|
|
454
454
|
for (const service of this.services) {
|
|
455
455
|
if (service.systemdConfigs) {
|
package/src/network.mjs
CHANGED
|
@@ -58,7 +58,7 @@ export class Network extends Owner {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
hosts() {
|
|
61
|
+
get hosts() {
|
|
62
62
|
if (this.bridge) {
|
|
63
63
|
let hosts = new Set();
|
|
64
64
|
for (const network of this.bridge) {
|
|
@@ -67,7 +67,7 @@ export class Network extends Owner {
|
|
|
67
67
|
return hosts;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
return super.hosts
|
|
70
|
+
return super.hosts;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
get bridge() {
|
package/src/owner.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export class Owner extends Base {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
*findServices(filter) {
|
|
163
|
-
for (const host of this.hosts
|
|
163
|
+
for (const host of this.hosts) {
|
|
164
164
|
yield* host.findServices(filter);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -186,12 +186,12 @@ export class Owner extends Base {
|
|
|
186
186
|
return hosts;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
hosts() {
|
|
189
|
+
get hosts() {
|
|
190
190
|
let hosts = this.directHosts();
|
|
191
191
|
|
|
192
192
|
for (const type of types.host.owners) {
|
|
193
193
|
for (const object of this.typeList(type)) {
|
|
194
|
-
hosts = hosts.union(object.hosts
|
|
194
|
+
hosts = hosts.union(object.hosts);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -338,7 +338,7 @@ export class Owner extends Base {
|
|
|
338
338
|
|
|
339
339
|
get derivedPackaging() {
|
|
340
340
|
let all = new Set();
|
|
341
|
-
for (const host of this.hosts
|
|
341
|
+
for (const host of this.hosts) {
|
|
342
342
|
all = all.union(host.packaging);
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -346,7 +346,7 @@ export class Owner extends Base {
|
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
*networkAddresses(filter) {
|
|
349
|
-
for (const host of this.hosts
|
|
349
|
+
for (const host of this.hosts) {
|
|
350
350
|
yield* host.networkAddresses(filter);
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -415,7 +415,7 @@ export class Owner extends Base {
|
|
|
415
415
|
get domains() {
|
|
416
416
|
let domains = new Set();
|
|
417
417
|
|
|
418
|
-
for (const object of this.hosts
|
|
418
|
+
for (const object of this.hosts) {
|
|
419
419
|
domains = domains.union(object.domains);
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -429,7 +429,7 @@ export class Owner extends Base {
|
|
|
429
429
|
get domainNames() {
|
|
430
430
|
let names = new Set();
|
|
431
431
|
|
|
432
|
-
for (const host of this.hosts
|
|
432
|
+
for (const host of this.hosts) {
|
|
433
433
|
names = names.union(new Set(host.domainNames));
|
|
434
434
|
}
|
|
435
435
|
|
|
@@ -449,7 +449,7 @@ export class Owner extends Base {
|
|
|
449
449
|
|
|
450
450
|
const architectures = new Set();
|
|
451
451
|
|
|
452
|
-
for (const host of this.hosts
|
|
452
|
+
for (const host of this.hosts) {
|
|
453
453
|
architectures.add(host.architecture);
|
|
454
454
|
}
|
|
455
455
|
|
package/src/service.mjs
CHANGED
package/types/host.d.mts
CHANGED
|
@@ -250,7 +250,7 @@ export class Host extends ServiceOwner {
|
|
|
250
250
|
domainNamesIn(domain: any): Generator<string, void, unknown>;
|
|
251
251
|
get clusters(): Set<any>;
|
|
252
252
|
get host(): this;
|
|
253
|
-
hosts():
|
|
253
|
+
get hosts(): this[];
|
|
254
254
|
named(name: any): any;
|
|
255
255
|
get networks(): Set<any>;
|
|
256
256
|
set networkInterfaces(networkInterface: Map<any, any>);
|
|
@@ -5,7 +5,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
|
|
|
5
5
|
_network: any;
|
|
6
6
|
get typeName(): string;
|
|
7
7
|
get host(): Host;
|
|
8
|
-
hosts():
|
|
8
|
+
get hosts(): Host[];
|
|
9
9
|
get network_interface(): this;
|
|
10
10
|
get domainName(): string;
|
|
11
11
|
get domainNames(): Set<any>;
|
package/types/owner.d.mts
CHANGED
|
@@ -195,7 +195,7 @@ export class Owner extends Base {
|
|
|
195
195
|
get locations(): any;
|
|
196
196
|
hostNamed(name: any): any;
|
|
197
197
|
directHosts(): Set<any>;
|
|
198
|
-
hosts(): Set<any>;
|
|
198
|
+
get hosts(): Set<any>;
|
|
199
199
|
networkNamed(name: any): any;
|
|
200
200
|
get networks(): any;
|
|
201
201
|
subnetNamed(name: any): any;
|
package/types/service.d.mts
CHANGED