pmcf 2.3.1 → 2.3.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 +1 -1
- package/src/base.mjs +1 -1
- package/src/owner.mjs +3 -3
- package/src/service.mjs +7 -7
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -412,7 +412,7 @@ export class Base {
|
|
|
412
412
|
switch (typeof object) {
|
|
413
413
|
case "string":
|
|
414
414
|
return object.replaceAll(/\$\{([^\}]*)\}/g, (match, m1) => {
|
|
415
|
-
return getAttribute(this, m1)
|
|
415
|
+
return getAttribute(this, m1) ?? "${" + m1 + "}";
|
|
416
416
|
});
|
|
417
417
|
|
|
418
418
|
case "object":
|
package/src/owner.mjs
CHANGED
|
@@ -314,7 +314,7 @@ export class Owner extends Base {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
get country() {
|
|
317
|
-
return this._country
|
|
317
|
+
return this._country ?? this.owner?.country;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
_locales = new Set();
|
|
@@ -341,7 +341,7 @@ export class Owner extends Base {
|
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
get timezone() {
|
|
344
|
-
return this._timezone
|
|
344
|
+
return this._timezone ?? this.owner?.timezone;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
_administratorEmail;
|
|
@@ -369,7 +369,7 @@ export class Owner extends Base {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
get domain() {
|
|
372
|
-
return this._domain
|
|
372
|
+
return this._domain ?? this.owner?.domain;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
get domains() {
|
package/src/service.mjs
CHANGED
|
@@ -66,7 +66,7 @@ export const ServiceTypeDefinition = {
|
|
|
66
66
|
priority: 0.4,
|
|
67
67
|
extends: Base.typeDefinition,
|
|
68
68
|
factoryFor(value) {
|
|
69
|
-
const type = value.type
|
|
69
|
+
const type = value.type ?? value.name;
|
|
70
70
|
|
|
71
71
|
if (type === "dns") {
|
|
72
72
|
delete value.type;
|
|
@@ -130,15 +130,15 @@ export class Service extends Base {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
get ipAddressOrDomainName() {
|
|
133
|
-
return this.rawAddress
|
|
133
|
+
return this.rawAddress ?? this.domainName;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
get rawAddresses() {
|
|
137
|
-
return this._ipAddresses
|
|
137
|
+
return this._ipAddresses ?? this.owner.rawAddresses;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
get rawAddress() {
|
|
141
|
-
return this._ipAddresses?.[0]
|
|
141
|
+
return this._ipAddresses?.[0] ?? this.server.rawAddress;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
set ipAddresses(value) {
|
|
@@ -180,7 +180,7 @@ export class Service extends Base {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
get type() {
|
|
183
|
-
return this._type
|
|
183
|
+
return this._type ?? this.name;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
get protocol() {
|
|
@@ -188,7 +188,7 @@ export class Service extends Base {
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
get tls() {
|
|
191
|
-
return ServiceTypes[this.type]?.tls
|
|
191
|
+
return ServiceTypes[this.type]?.tls ?? false;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
get systemdServices() {
|
|
@@ -206,7 +206,7 @@ export class Service extends Base {
|
|
|
206
206
|
records.push(
|
|
207
207
|
DNSRecord(
|
|
208
208
|
dnsFullName(
|
|
209
|
-
`_${ServiceTypes[this.type]?.type
|
|
209
|
+
`_${ServiceTypes[this.type]?.type ?? this.type}._${
|
|
210
210
|
ep.protocol
|
|
211
211
|
}.${domainName}`
|
|
212
212
|
),
|