pmcf 2.37.1 → 2.37.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
package/src/service.mjs
CHANGED
|
@@ -313,7 +313,7 @@ export class Service extends Base {
|
|
|
313
313
|
);
|
|
314
314
|
} else {
|
|
315
315
|
records.push(
|
|
316
|
-
DNSRecord("@", dnsRecord.type, this.priority, dnsFullName(domainName))
|
|
316
|
+
DNSRecord("@", dnsRecord.type, this.priority ?? 10, dnsFullName(domainName))
|
|
317
317
|
);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
@@ -324,6 +324,17 @@ export class Service extends Base {
|
|
|
324
324
|
|
|
325
325
|
export const sortByPriority = (a, b) => a.priority - b.priority;
|
|
326
326
|
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
* @param {*} sources
|
|
330
|
+
* @param {Object} [options]
|
|
331
|
+
* @param {Function} [options.services] filter for services
|
|
332
|
+
* @param {Function} [options.endpoints] filter for endpoints
|
|
333
|
+
* @param {Function} [options.select] mapper from Endpoint into result
|
|
334
|
+
* @param {number} [options.limit] upper limit of # result items
|
|
335
|
+
* @param {string} [options.join] jount result into a string
|
|
336
|
+
* @returns {string|any}
|
|
337
|
+
*/
|
|
327
338
|
export function serviceEndpoints(sources, options = {}) {
|
|
328
339
|
const all = asArray(sources)
|
|
329
340
|
.map(ft => Array.from(ft.findServices(options.services)))
|
package/types/service.d.mts
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {*} sources
|
|
4
|
+
* @param {Object} [options]
|
|
5
|
+
* @param {Function} [options.services] filter for services
|
|
6
|
+
* @param {Function} [options.endpoints] filter for endpoints
|
|
7
|
+
* @param {Function} [options.select] mapper from Endpoint into result
|
|
8
|
+
* @param {number} [options.limit] upper limit of # result items
|
|
9
|
+
* @param {string} [options.join] jount result into a string
|
|
10
|
+
* @returns {string|any}
|
|
11
|
+
*/
|
|
12
|
+
export function serviceEndpoints(sources: any, options?: {
|
|
13
|
+
services?: Function;
|
|
14
|
+
endpoints?: Function;
|
|
15
|
+
select?: Function;
|
|
16
|
+
limit?: number;
|
|
17
|
+
join?: string;
|
|
18
|
+
}): string | any;
|
|
2
19
|
export namespace endpointProperties {
|
|
3
20
|
export namespace port {
|
|
4
21
|
let type: string;
|
|
@@ -247,8 +247,8 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
247
247
|
systemdConfig(name: any): {
|
|
248
248
|
name: string;
|
|
249
249
|
content: (string | {
|
|
250
|
-
DNS:
|
|
251
|
-
FallbackDNS:
|
|
250
|
+
DNS: any;
|
|
251
|
+
FallbackDNS: any;
|
|
252
252
|
Domains: string;
|
|
253
253
|
DNSSEC: string;
|
|
254
254
|
MulticastDNS: string;
|