pmcf 2.37.2 → 2.38.0

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/README.md CHANGED
@@ -27,6 +27,8 @@
27
27
  * [subnet](#subnet)
28
28
  * [networkInterface](#networkinterface)
29
29
  * [address](#address)
30
+ * [serviceEndpoints](#serviceendpoints)
31
+ * [Parameters](#parameters-2)
30
32
 
31
33
  ## networkAddresses
32
34
 
@@ -56,6 +58,21 @@ Type: NetworkInterface
56
58
 
57
59
  Type: ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) | [Uint16Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array))
58
60
 
61
+ ## serviceEndpoints
62
+
63
+ ### Parameters
64
+
65
+ * `sources` **any** 
66
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** (optional, default `{}`)
67
+
68
+ * `options.services` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** filter for services
69
+ * `options.endpoints` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** filter for endpoints
70
+ * `options.select` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** mapper from Endpoint into result
71
+ * `options.limit` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?** upper limit of # result items
72
+ * `options.join` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** jount result into a string
73
+
74
+ Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | any)** 
75
+
59
76
  # install
60
77
 
61
78
  With [npm](http://npmjs.org) do:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.37.2",
3
+ "version": "2.38.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/service.mjs CHANGED
@@ -232,14 +232,6 @@ export class Service extends Base {
232
232
  return this.endpoints()[0].port;
233
233
  }
234
234
 
235
- get protocol() {
236
- return this.endpoints()[0].protocol;
237
- }
238
-
239
- get tls() {
240
- return this.endpoints()[0].tls;
241
- }
242
-
243
235
  set weight(value) {
244
236
  this._weight = value;
245
237
  }
@@ -335,11 +335,10 @@ async function generateZoneDefs(dns, location, packageData) {
335
335
  addHook(
336
336
  packageData.properties.hooks,
337
337
  "post_upgrade",
338
- // `rm -f ${foreignZones.map(zone => `/var/lib/named/${zone.file}.jnl`)}\n` +
339
- // "systemctl try-reload-or-restart named\n" +
340
- `/usr/bin/named-hostname-info ${foreignZones
341
- .map(zone => zone.id)
342
- .join(" ")}|/usr/bin/named-hostname-update`
338
+ `rm -f ${foreignZones.map(zone => `/var/lib/named/${zone.file}.jnl`)}\n` +
339
+ `/usr/bin/named-hostname-info ${foreignZones
340
+ .map(zone => zone.id)
341
+ .join(" ")}|/usr/bin/named-hostname-update`
343
342
  );
344
343
  }
345
344
 
@@ -320,8 +320,6 @@ export class Service extends Base {
320
320
  get alias(): any;
321
321
  set port(value: any);
322
322
  get port(): any;
323
- get protocol(): any;
324
- get tls(): any;
325
323
  set weight(value: any);
326
324
  get weight(): any;
327
325
  set type(value: any);