pmcf 6.2.0 → 6.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,7 +17,8 @@ import {
17
17
  HTTPEndpoint,
18
18
  UnixEndpoint,
19
19
  addType,
20
- FAMILY_UNIX
20
+ FAMILY_UNIX,
21
+ FAMILY_DNS
21
22
  } from "pmcf";
22
23
  import { asArray } from "./utils.mjs";
23
24
  import { networkAddressAttributes } from "./common-attributes.mjs";
@@ -141,7 +142,7 @@ export class CoreService extends Base {
141
142
  break;
142
143
 
143
144
  case undefined:
144
- case "dns":
145
+ case FAMILY_DNS:
145
146
  case FAMILY_IPV4:
146
147
  case FAMILY_IPV6:
147
148
  const options =
package/src/endpoint.mjs CHANGED
@@ -3,6 +3,7 @@ import { addType } from "pmcf";
3
3
  import { endpointAttributes, CoreService } from "./core-service.mjs";
4
4
 
5
5
  export const FAMILY_UNIX = "unix";
6
+ export const FAMILY_DNS = "dns";
6
7
 
7
8
  class BaseEndpoint {
8
9
  static name = "endpoint";
@@ -114,7 +115,7 @@ export class DomainNameEndpoint extends PortEndpoint {
114
115
  }
115
116
 
116
117
  get family() {
117
- return "dns"; // TODO
118
+ return FAMILY_DNS;
118
119
  }
119
120
 
120
121
  get address() {
@@ -23,7 +23,8 @@ import {
23
23
  serviceEndpoints,
24
24
  addresses,
25
25
  networkAddressType,
26
- addType
26
+ addType,
27
+ FAMILY_DNS
27
28
  } from "pmcf";
28
29
  import { yesno, writeLines, asArray } from "../utils.mjs";
29
30
  import {
@@ -501,8 +502,8 @@ export class bind extends ExtraSourceService {
501
502
 
502
503
  async writeForwarders(outputControl) {
503
504
  const forwarders = serviceEndpoints(this.source, {
504
- services: 'services[types[dns] && priority>=100 && priority<200]',
505
- endpoints: endpoint => endpoint.family !== "dns",
505
+ services: "services[types[dns] && priority>=100 && priority<200]",
506
+ endpoints: endpoint => endpoint.family !== FAMILY_DNS,
506
507
  select: e => e.address,
507
508
  limit: 5
508
509
  });