pmcf 2.33.0 → 2.33.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": "2.33.0",
3
+ "version": "2.33.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/service.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isLocalhost } from "ip-utilties";
2
- import { Base, Endpoint } from "pmcf";
2
+ import { Base, Host, Endpoint } from "pmcf";
3
3
  import { addType } from "./types.mjs";
4
4
  import { asArray } from "./utils.mjs";
5
5
  import { networkAddressProperties } from "./network-support.mjs";
@@ -149,7 +149,9 @@ export class Service extends Base {
149
149
  }
150
150
 
151
151
  get host() {
152
- return this.owner;
152
+ if(this.owner instanceof Host) {
153
+ return this.owner;
154
+ }
153
155
  }
154
156
 
155
157
  *hosts() {
@@ -305,13 +305,14 @@ export class Service extends Base {
305
305
  _extends: any[];
306
306
  set extends(value: any[]);
307
307
  get extends(): any[];
308
+ get host(): Host;
308
309
  hosts(): Generator<any, void, any>;
309
310
  get domainName(): any;
310
311
  get ipAddressOrDomainName(): any;
311
312
  get addresses(): any;
312
313
  get address(): any;
313
314
  set ipAddresses(value: any);
314
- get networks(): any;
315
+ get networks(): Set<any>;
315
316
  endpoints(filter: any): any[];
316
317
  set alias(value: any);
317
318
  get alias(): any;
@@ -333,3 +334,4 @@ export class Service extends Base {
333
334
  }
334
335
  export function sortByPriority(a: any, b: any): number;
335
336
  import { Base } from "pmcf";
337
+ import { Host } from "pmcf";