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 +17 -0
- package/package.json +1 -1
- package/src/service.mjs +0 -8
- package/src/services/dns.mjs +4 -5
- package/types/service.d.mts +0 -2
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
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
|
}
|
package/src/services/dns.mjs
CHANGED
|
@@ -335,11 +335,10 @@ async function generateZoneDefs(dns, location, packageData) {
|
|
|
335
335
|
addHook(
|
|
336
336
|
packageData.properties.hooks,
|
|
337
337
|
"post_upgrade",
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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
|
|
package/types/service.d.mts
CHANGED