pmcf 2.3.0 → 2.3.1
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 +4 -9
- package/src/host.mjs +14 -14
- package/src/service.mjs +4 -12
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -289,11 +289,11 @@ export class Base {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
get domains() {
|
|
292
|
-
return this.owner?.domains
|
|
292
|
+
return this.owner?.domains ?? new Set();
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
get localDomains() {
|
|
296
|
-
return this.owner?.localDomains
|
|
296
|
+
return this.owner?.localDomains ?? new Set();
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
get administratorEmail() {
|
|
@@ -317,12 +317,7 @@ export class Base {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
get priority() {
|
|
320
|
-
|
|
321
|
-
return this._priority;
|
|
322
|
-
}
|
|
323
|
-
if (this.owner?.priority !== undefined) {
|
|
324
|
-
return this.owner.priority;
|
|
325
|
-
}
|
|
320
|
+
return this._priority ?? this.owner?.priority;
|
|
326
321
|
}
|
|
327
322
|
|
|
328
323
|
get smtp() {
|
|
@@ -351,7 +346,7 @@ export class Base {
|
|
|
351
346
|
}
|
|
352
347
|
|
|
353
348
|
get directory() {
|
|
354
|
-
return this._directory
|
|
349
|
+
return this._directory ?? join(this.owner.directory, this.name);
|
|
355
350
|
}
|
|
356
351
|
|
|
357
352
|
get fullName() {
|
package/src/host.mjs
CHANGED
|
@@ -138,7 +138,7 @@ export class Host extends Base {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
get serial() {
|
|
141
|
-
return this._serial
|
|
141
|
+
return this._serial ?? this.extends.find(e => e.serial)?.serial;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
set deployment(value) {
|
|
@@ -146,7 +146,7 @@ export class Host extends Base {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
get deployment() {
|
|
149
|
-
return this._deployment
|
|
149
|
+
return this._deployment ?? this.extends.find(e => e.deployment)?.deployment;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
set chassis(value) {
|
|
@@ -154,7 +154,7 @@ export class Host extends Base {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
get chassis() {
|
|
157
|
-
return this._chassis
|
|
157
|
+
return this._chassis ?? this.extends.find(e => e.chassis)?.chassis;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
set vendor(value) {
|
|
@@ -162,7 +162,7 @@ export class Host extends Base {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
get vendor() {
|
|
165
|
-
return this._vendor
|
|
165
|
+
return this._vendor ?? this.extends.find(e => e.vendor)?.vendor;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
set architecture(value) {
|
|
@@ -171,7 +171,7 @@ export class Host extends Base {
|
|
|
171
171
|
|
|
172
172
|
get architecture() {
|
|
173
173
|
return (
|
|
174
|
-
this._architecture
|
|
174
|
+
this._architecture ?? this.extends.find(e => e.architecture)?.architecture
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
|
|
@@ -258,7 +258,7 @@ export class Host extends Base {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
get os() {
|
|
261
|
-
return this._os
|
|
261
|
+
return this._os ?? this.extends.find(e => e.os)?.os;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
set distribution(value) {
|
|
@@ -267,7 +267,7 @@ export class Host extends Base {
|
|
|
267
267
|
|
|
268
268
|
get distribution() {
|
|
269
269
|
return (
|
|
270
|
-
this._distribution
|
|
270
|
+
this._distribution ?? this.extends.find(e => e.distribution)?.distribution
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -580,7 +580,7 @@ export class NetworkInterface extends Base {
|
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
get hostName() {
|
|
583
|
-
return this._hostName
|
|
583
|
+
return this._hostName ?? this.host.hostName;
|
|
584
584
|
}
|
|
585
585
|
|
|
586
586
|
set hostName(value) {
|
|
@@ -602,7 +602,7 @@ export class NetworkInterface extends Base {
|
|
|
602
602
|
}
|
|
603
603
|
|
|
604
604
|
get network() {
|
|
605
|
-
return this._network
|
|
605
|
+
return this._network ?? this.host.network;
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
set network(network) {
|
|
@@ -614,7 +614,7 @@ export class NetworkInterface extends Base {
|
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
get scope() {
|
|
617
|
-
return this._scope
|
|
617
|
+
return this._scope ?? this.network?.scope ?? "global";
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
set metric(value) {
|
|
@@ -622,7 +622,7 @@ export class NetworkInterface extends Base {
|
|
|
622
622
|
}
|
|
623
623
|
|
|
624
624
|
get metric() {
|
|
625
|
-
return this._metric
|
|
625
|
+
return this._metric ?? this.network?.metric ?? 1004;
|
|
626
626
|
}
|
|
627
627
|
|
|
628
628
|
set ssid(value) {
|
|
@@ -630,7 +630,7 @@ export class NetworkInterface extends Base {
|
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
get ssid() {
|
|
633
|
-
return this._ssid
|
|
633
|
+
return this._ssid ?? this.network?.ssid;
|
|
634
634
|
}
|
|
635
635
|
|
|
636
636
|
set psk(value) {
|
|
@@ -638,7 +638,7 @@ export class NetworkInterface extends Base {
|
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
get psk() {
|
|
641
|
-
return this._psk
|
|
641
|
+
return this._psk ?? this.network?.psk;
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
set kind(value) {
|
|
@@ -646,6 +646,6 @@ export class NetworkInterface extends Base {
|
|
|
646
646
|
}
|
|
647
647
|
|
|
648
648
|
get kind() {
|
|
649
|
-
return this._kind
|
|
649
|
+
return this._kind ?? this.network?.kind;
|
|
650
650
|
}
|
|
651
651
|
}
|
package/src/service.mjs
CHANGED
|
@@ -164,7 +164,7 @@ export class Service extends Base {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
get port() {
|
|
167
|
-
return this._port
|
|
167
|
+
return this._port ?? ServiceTypes[this.type]?.endpoints[0].port;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
set weight(value) {
|
|
@@ -172,15 +172,7 @@ export class Service extends Base {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
get weight() {
|
|
175
|
-
|
|
176
|
-
return this._weight;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (this.owner.weight !== undefined) {
|
|
180
|
-
return this.owner.weight;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return 1;
|
|
175
|
+
return this._weight ?? this.owner.weight ?? 1;
|
|
184
176
|
}
|
|
185
177
|
|
|
186
178
|
set type(value) {
|
|
@@ -219,7 +211,7 @@ export class Service extends Base {
|
|
|
219
211
|
}.${domainName}`
|
|
220
212
|
),
|
|
221
213
|
"SRV",
|
|
222
|
-
this.priority
|
|
214
|
+
this.priority ?? 10,
|
|
223
215
|
this.weight,
|
|
224
216
|
ep.port,
|
|
225
217
|
dnsFullName(this.domainName)
|
|
@@ -247,7 +239,7 @@ export class Service extends Base {
|
|
|
247
239
|
DNSRecord(
|
|
248
240
|
dnsFullName(domainName),
|
|
249
241
|
dnsRecord.type,
|
|
250
|
-
this.priority
|
|
242
|
+
this.priority ?? 10,
|
|
251
243
|
".",
|
|
252
244
|
dnsFormatParameters(parameters)
|
|
253
245
|
)
|