pmcf 2.35.4 → 2.35.5

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": "2.35.4",
3
+ "version": "2.35.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/service.mjs CHANGED
@@ -318,5 +318,9 @@ export function serviceEndpoints(sources, options = {}) {
318
318
 
319
319
  const res = [...new Set(options.select ? all.map(options.select) : all)];
320
320
 
321
+ if(options.limit < res.length) {
322
+ res.length = options.limit;
323
+ }
324
+
321
325
  return options.join ? res.join(options.join) : res;
322
326
  }
@@ -211,7 +211,8 @@ export class DNSService extends ExtraSourceService {
211
211
 
212
212
  const forwarders = serviceEndpoints(this.source, {
213
213
  services: { type: "dns", priority: ">=20" },
214
- select: e => e.address
214
+ select: e => e.address,
215
+ limit: 5
215
216
  });
216
217
 
217
218
  if (forwarders.length) {
@@ -42,7 +42,8 @@ export class SystemdResolvedService extends ExtraSourceService {
42
42
  services: { type: "dns", priority },
43
43
  endpoints: e => e.networkInterface.kind !== "loopback",
44
44
  select: endpoint => endpoint.address,
45
- join: " "
45
+ join: " ",
46
+ limit: 5
46
47
  };
47
48
  };
48
49