pmcf 6.68.10 → 6.68.12

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.68.10",
3
+ "version": "6.68.12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -201,23 +201,14 @@ export class CoreService extends base {
201
201
  return this.endpoints(filter)[0];
202
202
  }
203
203
 
204
- address(
205
- options = {
206
- endpoints: e =>
207
- e.networkInterface && e.networkInterface.kind !== "loopbak",
208
- select: e => e.domainName || e.address,
209
- limit: 1,
210
- join: ""
211
- }
212
- ) {
213
- const all = this.endpoints(options.endpoints);
214
- const res = [...new Set(options.select ? all.map(options.select) : all)];
215
-
216
- if (options.limit < res.length) {
217
- res.length = options.limit;
218
- }
219
-
220
- return options.join !== undefined ? res.join(options.join) : res;
204
+ get address() {
205
+ return [
206
+ ...new Set(
207
+ this.endpoints(
208
+ e => e.networkInterface && e.networkInterface.kind !== "loopbak"
209
+ ).map(e => e.domainName || e.address)
210
+ )
211
+ ][0];
221
212
  }
222
213
 
223
214
  set port(value) {
@@ -28,30 +28,30 @@ export class InitializationContext {
28
28
  .outstandingResolves) {
29
29
  value = object.expand(value);
30
30
 
31
- for (const node of object.walkDirections(["this", "owner"])) {
32
- const resolved = this.named(value, node);
33
- if (resolved) {
31
+ function resolve(resolved)
32
+ {
34
33
  assign(attribute, object, resolved);
35
34
 
36
35
  if (attribute.name === "extends") {
37
36
  // TODO attribute action ?
38
37
  object.materializeExtends();
39
38
  }
39
+ }
40
40
 
41
+ for (const node of object.walkDirections(["this", "owner"])) {
42
+ const resolved = this.named(value, node);
43
+ if (resolved) {
44
+ resolve(resolved);
41
45
  continue nextOutstanding;
42
46
  }
43
47
  }
44
48
 
45
49
  const resolved = object.expression(value);
46
50
  if (resolved) {
47
- assign(attribute, object, resolved);
48
-
49
- if (attribute.name === "extends") {
50
- // TODO attribute action ?
51
- object.materializeExtends();
51
+ if (resolved) {
52
+ resolve(resolved);
53
+ continue nextOutstanding;
52
54
  }
53
-
54
- continue nextOutstanding;
55
55
  }
56
56
 
57
57
  this.error(
@@ -491,7 +491,7 @@ class bind_view extends bind_object {
491
491
  `(${this.soaUpdates.join(" ")})`
492
492
  ),
493
493
  ...asArray(service.authorative).map(dns =>
494
- DNSRecord("@", "NS", dnsFullName(dns.address()))
494
+ DNSRecord("@", "NS", dnsFullName(dns.address))
495
495
  )
496
496
  ];
497
497
  }