pmcf 2.9.1 → 2.9.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/service.mjs CHANGED
@@ -89,7 +89,12 @@ export const ServiceTypeDefinition = {
89
89
  alias: { type: "string", collection: false, writeable: true },
90
90
  type: { type: "string", collection: false, writeable: true },
91
91
  weight: { type: "number", collection: false, writeable: true, default: 1 },
92
- tls: { type: "string", collection: false, writeable: false, default: false },
92
+ tls: {
93
+ type: "string",
94
+ collection: false,
95
+ writeable: false,
96
+ default: false
97
+ },
93
98
  systemd: { type: "string", collection: true, writeable: true }
94
99
  }
95
100
  };
@@ -149,12 +154,12 @@ export class Service extends Base {
149
154
 
150
155
  get endpoints() {
151
156
  if (!ServiceTypes[this.type]) {
152
- return [
153
- { address: this.rawAddress, port: this._port, tls: false }
154
- ];
157
+ return [{ address: this.rawAddress, port: this._port, tls: false }];
155
158
  }
156
159
 
157
- return ServiceTypes[this.type].endpoints;
160
+ return ServiceTypes[this.type].endpoints.map(e =>
161
+ Object.assign({ address: this.rawAddress }, e)
162
+ );
158
163
  }
159
164
 
160
165
  set port(value) {
@@ -63,7 +63,7 @@ export class DHCPService extends Service {
63
63
  "interfaces-config": {
64
64
  interfaces: [...host.networkInterfaces.values()]
65
65
  .filter(ni => ni.kind !== "loopback")
66
- .map(ni => ni.name)
66
+ .map(ni => `${ni.name}/${ni.rawAddress}`)
67
67
  },
68
68
  "lease-database": {
69
69
  type: "memfile",