pmcf 2.21.2 → 2.22.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 +1 -0
- package/package.json +1 -1
- package/src/cluster.mjs +3 -3
- package/src/host.mjs +5 -6
- package/src/network-interface.mjs +4 -11
- package/src/network-support.mjs +6 -2
- package/src/service.mjs +28 -33
- package/src/services/dhcp.mjs +22 -22
- package/src/services/dns.mjs +15 -12
- package/src/services/ntp.mjs +1 -1
- package/types/cluster.d.mts +2 -2
- package/types/extra-source-service.d.mts +2 -2
- package/types/host.d.mts +4 -4
- package/types/network-interface.d.mts +10 -10
- package/types/network-support.d.mts +3 -2
- package/types/service.d.mts +10 -11
- package/types/services/dhcp.d.mts +4 -4
- package/types/services/dns.d.mts +4 -4
- package/types/services/ntp.d.mts +4 -4
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ Type: [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
33
33
|
|
|
34
34
|
* `networkInterface` **NetworkInterface** 
|
|
35
35
|
* `address` **([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))** 
|
|
36
|
+
* `family` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
36
37
|
* `subnet` **Subnet** 
|
|
37
38
|
* `domainNames` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** 
|
|
38
39
|
|
package/package.json
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -87,7 +87,7 @@ export class Cluster extends Host {
|
|
|
87
87
|
" notification_email {",
|
|
88
88
|
" " + this.administratorEmail,
|
|
89
89
|
" }",
|
|
90
|
-
` smtp_server ${this.smtp.
|
|
90
|
+
` smtp_server ${this.smtp.address}`,
|
|
91
91
|
` notification_email_from keepalived@${host.domainName}`,
|
|
92
92
|
" enable_script_security",
|
|
93
93
|
" script_user root",
|
|
@@ -132,7 +132,7 @@ export class Cluster extends Host {
|
|
|
132
132
|
cfg.push("");
|
|
133
133
|
|
|
134
134
|
for (const service of cluster.findServices({ type: "http" })) {
|
|
135
|
-
cfg.push(`virtual_server ${cluster.
|
|
135
|
+
cfg.push(`virtual_server ${cluster.address} ${service.port} {`);
|
|
136
136
|
cfg.push(` delay_loop ${cluster.checkInterval}`);
|
|
137
137
|
cfg.push(" lb_algo wlc");
|
|
138
138
|
cfg.push(" persistence_timeout 600");
|
|
@@ -142,7 +142,7 @@ export class Cluster extends Host {
|
|
|
142
142
|
const memberService = member.findService({ type: service.type });
|
|
143
143
|
|
|
144
144
|
cfg.push(
|
|
145
|
-
` real_server ${member.
|
|
145
|
+
` real_server ${member.address} ${memberService.port} {`
|
|
146
146
|
);
|
|
147
147
|
cfg.push(` weight ${memberService.weight}`);
|
|
148
148
|
|
package/src/host.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
|
-
import { formatCIDR } from "ip-utilties";
|
|
5
4
|
import { Base } from "./base.mjs";
|
|
6
|
-
import { networkAddressProperties } from "./network-support.mjs";
|
|
5
|
+
import { networkAddressProperties, addresses } from "./network-support.mjs";
|
|
7
6
|
import { domainFromDominName, domainName } from "./utils.mjs";
|
|
8
7
|
import { objectFilter } from "./filter.mjs";
|
|
9
8
|
import { addType, types } from "./types.mjs";
|
|
@@ -427,12 +426,12 @@ export class Host extends Base {
|
|
|
427
426
|
}
|
|
428
427
|
}
|
|
429
428
|
|
|
430
|
-
get
|
|
431
|
-
return this.
|
|
429
|
+
get address() {
|
|
430
|
+
return this.addresses[0];
|
|
432
431
|
}
|
|
433
432
|
|
|
434
|
-
get
|
|
435
|
-
return
|
|
433
|
+
get addresses() {
|
|
434
|
+
return addresses(this.networkAddresses());
|
|
436
435
|
}
|
|
437
436
|
|
|
438
437
|
async publicKey(type = "ed25519") {
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isIPv4,
|
|
3
|
-
isIPv6,
|
|
4
|
-
formatCIDR,
|
|
5
|
-
hasWellKnownSubnet,
|
|
6
|
-
normalizeIP,
|
|
7
|
-
familyIP
|
|
8
|
-
} from "ip-utilties";
|
|
1
|
+
import { hasWellKnownSubnet, normalizeIP, familyIP } from "ip-utilties";
|
|
9
2
|
import { Base } from "./base.mjs";
|
|
10
3
|
import { Subnet } from "./subnet.mjs";
|
|
11
4
|
import {
|
|
@@ -100,11 +93,11 @@ class SkeletonNetworkInterface extends Base {
|
|
|
100
93
|
}
|
|
101
94
|
}
|
|
102
95
|
|
|
103
|
-
get
|
|
104
|
-
return this.
|
|
96
|
+
get address() {
|
|
97
|
+
return this.addresses[0];
|
|
105
98
|
}
|
|
106
99
|
|
|
107
|
-
get
|
|
100
|
+
get addresses() {
|
|
108
101
|
return [...this.ipAddresses].map(([address]) => address);
|
|
109
102
|
}
|
|
110
103
|
}
|
package/src/network-support.mjs
CHANGED
|
@@ -37,10 +37,14 @@ export const networkAddressProperties = {
|
|
|
37
37
|
hostName: { type: "string", collection: false, writeable: true },
|
|
38
38
|
cidrAddresses: { type: "string", collection: true, writeable: false },
|
|
39
39
|
cidrAddress: { type: "string", collection: false, writeable: false },
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
addresses: { type: "string", collection: true, writeable: false },
|
|
41
|
+
address: { type: "string", collection: false, writeable: false }
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
export function addresses(networkAddresses) {
|
|
45
|
+
return [...networkAddresses].map(na => na.address);
|
|
46
|
+
}
|
|
47
|
+
|
|
44
48
|
export function cidrAddresses(networkAddresses) {
|
|
45
49
|
return [...networkAddresses].map(na =>
|
|
46
50
|
formatCIDR(na.address, na.subnet.prefixLength)
|
package/src/service.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { isLocalhost } from "ip-utilties";
|
|
1
|
+
import { isLocalhost, familyIP } from "ip-utilties";
|
|
2
2
|
import { Base } from "./base.mjs";
|
|
3
3
|
import { addType } from "./types.mjs";
|
|
4
|
-
import { objectFilter } from "./filter.mjs";
|
|
5
4
|
import { asArray } from "./utils.mjs";
|
|
6
5
|
import { networkAddressProperties } from "./network-support.mjs";
|
|
7
6
|
import {
|
|
@@ -158,15 +157,15 @@ export class Service extends Base {
|
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
get ipAddressOrDomainName() {
|
|
161
|
-
return this.
|
|
160
|
+
return this.address ?? this.domainName;
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
get
|
|
165
|
-
return this._ipAddresses ?? this.owner.
|
|
163
|
+
get addresses() {
|
|
164
|
+
return this._ipAddresses ?? this.owner.addresses;
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
get
|
|
169
|
-
return this._ipAddresses?.[0] ?? this.server.
|
|
167
|
+
get address() {
|
|
168
|
+
return this._ipAddresses?.[0] ?? this.server.address;
|
|
170
169
|
}
|
|
171
170
|
|
|
172
171
|
set ipAddresses(value) {
|
|
@@ -177,7 +176,7 @@ export class Service extends Base {
|
|
|
177
176
|
return this.server.networks;
|
|
178
177
|
}
|
|
179
178
|
|
|
180
|
-
|
|
179
|
+
endpoints(filter) {
|
|
181
180
|
const local =
|
|
182
181
|
this._port === undefined
|
|
183
182
|
? { type: this.type }
|
|
@@ -189,22 +188,20 @@ export class Service extends Base {
|
|
|
189
188
|
}
|
|
190
189
|
];
|
|
191
190
|
|
|
192
|
-
|
|
191
|
+
const result = [...this.server.networkAddresses()]
|
|
193
192
|
.map(sa =>
|
|
194
193
|
data.map(
|
|
195
194
|
d =>
|
|
196
195
|
new Endpoint(this, sa.networkInterface, {
|
|
197
196
|
...d,
|
|
198
|
-
|
|
197
|
+
address: sa.address,
|
|
199
198
|
...local
|
|
200
199
|
})
|
|
201
200
|
)
|
|
202
201
|
)
|
|
203
202
|
.flat();
|
|
204
|
-
}
|
|
205
203
|
|
|
206
|
-
|
|
207
|
-
yield* objectFilter(EndpointTypeDefinition, this.endpoints, filter);
|
|
204
|
+
return filter ? result.filter(filter) : result;
|
|
208
205
|
}
|
|
209
206
|
|
|
210
207
|
set alias(value) {
|
|
@@ -220,15 +217,15 @@ export class Service extends Base {
|
|
|
220
217
|
}
|
|
221
218
|
|
|
222
219
|
get port() {
|
|
223
|
-
return this.endpoints[0].port;
|
|
220
|
+
return this.endpoints()[0].port;
|
|
224
221
|
}
|
|
225
222
|
|
|
226
223
|
get protocol() {
|
|
227
|
-
return this.endpoints[0].protocol;
|
|
224
|
+
return this.endpoints()[0].protocol;
|
|
228
225
|
}
|
|
229
226
|
|
|
230
227
|
get tls() {
|
|
231
|
-
return this.endpoints[0].tls;
|
|
228
|
+
return this.endpoints()[0].tls;
|
|
232
229
|
}
|
|
233
230
|
|
|
234
231
|
set weight(value) {
|
|
@@ -258,8 +255,8 @@ export class Service extends Base {
|
|
|
258
255
|
}
|
|
259
256
|
|
|
260
257
|
if (hasSVRRecords) {
|
|
261
|
-
for (const ep of this.endpoints
|
|
262
|
-
e => e.protocol && e.networkInterface.
|
|
258
|
+
for (const ep of this.endpoints(
|
|
259
|
+
e => e.protocol && e.networkInterface.kind !== "loopback"
|
|
263
260
|
)) {
|
|
264
261
|
records.push(
|
|
265
262
|
DNSRecord(
|
|
@@ -321,11 +318,10 @@ export class Endpoint {
|
|
|
321
318
|
}
|
|
322
319
|
|
|
323
320
|
toString() {
|
|
324
|
-
return `${this.
|
|
321
|
+
return `${this.address}[${this.port}]`;
|
|
325
322
|
}
|
|
326
323
|
|
|
327
|
-
get socketAddress()
|
|
328
|
-
{
|
|
324
|
+
get socketAddress() {
|
|
329
325
|
return `${this.address}:${this.port}`;
|
|
330
326
|
}
|
|
331
327
|
|
|
@@ -333,19 +329,18 @@ export class Endpoint {
|
|
|
333
329
|
return this.networkInterface.hostName;
|
|
334
330
|
}
|
|
335
331
|
|
|
336
|
-
#
|
|
332
|
+
#address;
|
|
337
333
|
|
|
338
|
-
get address()
|
|
339
|
-
|
|
340
|
-
return this.#rawAddress ?? this.networkInterface.rawAddress;
|
|
334
|
+
get address() {
|
|
335
|
+
return this.#address ?? this.networkInterface.address;
|
|
341
336
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
337
|
+
|
|
338
|
+
set address(value) {
|
|
339
|
+
this.#address = value;
|
|
345
340
|
}
|
|
346
341
|
|
|
347
|
-
|
|
348
|
-
this
|
|
342
|
+
get family() {
|
|
343
|
+
return familyIP(this.address);
|
|
349
344
|
}
|
|
350
345
|
}
|
|
351
346
|
|
|
@@ -354,7 +349,7 @@ export const sortByPriority = (a, b) => a.priority - b.priority;
|
|
|
354
349
|
export function serviceAddresses(
|
|
355
350
|
sources,
|
|
356
351
|
filter,
|
|
357
|
-
addressType = "
|
|
352
|
+
addressType = "addresses",
|
|
358
353
|
addressFilter = a => !isLocalhost(a)
|
|
359
354
|
) {
|
|
360
355
|
return asArray(sources)
|
|
@@ -366,11 +361,11 @@ export function serviceAddresses(
|
|
|
366
361
|
.filter(addressFilter);
|
|
367
362
|
}
|
|
368
363
|
|
|
369
|
-
export function serviceEndpoints(sources, filter) {
|
|
364
|
+
export function serviceEndpoints(sources, filter, endpointFilter) {
|
|
370
365
|
return asArray(sources)
|
|
371
366
|
.map(ft => Array.from(ft.findServices(filter)))
|
|
372
367
|
.flat()
|
|
373
368
|
.sort(sortByPriority)
|
|
374
|
-
.map(service => service.endpoints)
|
|
369
|
+
.map(service => service.endpoints(endpointFilter))
|
|
375
370
|
.flat();
|
|
376
371
|
}
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const DHCPServiceTypeDefinition = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
const controlAgentEndpoint = {
|
|
23
|
-
|
|
23
|
+
// extends: ["http"],
|
|
24
24
|
type: "kea-control-agent",
|
|
25
25
|
port: 8000,
|
|
26
26
|
protocol: "tcp",
|
|
@@ -52,18 +52,18 @@ export class DHCPService extends Service {
|
|
|
52
52
|
return DHCPServiceTypeDefinition.name;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
endpoints(filter) {
|
|
56
56
|
const l0 = this.server.findNetworkInterface({ scope: "host" });
|
|
57
57
|
|
|
58
58
|
if (l0) {
|
|
59
59
|
return [
|
|
60
|
-
...super.endpoints,
|
|
60
|
+
...super.endpoints(filter),
|
|
61
61
|
new Endpoint(this, l0, controlAgentEndpoint),
|
|
62
62
|
new Endpoint(this, l0, ddnsEndpoint)
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
return super.endpoints;
|
|
66
|
+
return super.endpoints(filter);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
async *preparePackages(dir) {
|
|
@@ -147,9 +147,9 @@ export class DHCPService extends Service {
|
|
|
147
147
|
return {
|
|
148
148
|
name: domain,
|
|
149
149
|
"dns-servers": dnsServerEndpoints
|
|
150
|
-
.filter(endpoint => isIPv4(endpoint.
|
|
150
|
+
.filter(endpoint => isIPv4(endpoint.address))
|
|
151
151
|
.map(endpoint => {
|
|
152
|
-
return { "ip-address": endpoint.
|
|
152
|
+
return { "ip-address": endpoint.address };
|
|
153
153
|
})
|
|
154
154
|
};
|
|
155
155
|
});
|
|
@@ -209,23 +209,23 @@ export class DHCPService extends Service {
|
|
|
209
209
|
.map(([k, networkInterface]) => {
|
|
210
210
|
return {
|
|
211
211
|
"hw-address": k,
|
|
212
|
-
"ip-address": networkInterface.networkAddress(
|
|
212
|
+
"ip-address": networkInterface.networkAddress(
|
|
213
|
+
n => n.family === "IPv4"
|
|
214
|
+
).address,
|
|
213
215
|
hostname: networkInterface.hostName
|
|
214
216
|
};
|
|
215
217
|
})
|
|
216
218
|
.sort((a, b) => a.hostname.localeCompare(b.hostname));
|
|
217
219
|
|
|
218
220
|
const listenInterfaces = filter =>
|
|
219
|
-
this.endpoints
|
|
220
|
-
|
|
221
|
-
endpoint
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
endpoint => `${endpoint.networkInterface.name}/${endpoint.rawAddress}`
|
|
228
|
-
);
|
|
221
|
+
this.endpoints(
|
|
222
|
+
endpoint =>
|
|
223
|
+
endpoint.type === "dhcp" &&
|
|
224
|
+
filter(endpoint.address) &&
|
|
225
|
+
endpoint.networkInterface.kind !== "loopback"
|
|
226
|
+
).map(
|
|
227
|
+
endpoint => `${endpoint.networkInterface.name}/${endpoint.address}`
|
|
228
|
+
);
|
|
229
229
|
|
|
230
230
|
const dhcp4 = {
|
|
231
231
|
Dhcp4: {
|
|
@@ -244,8 +244,8 @@ export class DHCPService extends Service {
|
|
|
244
244
|
{
|
|
245
245
|
name: "domain-name-servers",
|
|
246
246
|
data: dnsServerEndpoints
|
|
247
|
-
.filter(endpoint => isIPv4(endpoint.
|
|
248
|
-
.map(endpoint => endpoint.
|
|
247
|
+
.filter(endpoint => isIPv4(endpoint.address))
|
|
248
|
+
.map(endpoint => endpoint.address)
|
|
249
249
|
.join(",")
|
|
250
250
|
},
|
|
251
251
|
{
|
|
@@ -263,7 +263,7 @@ export class DHCPService extends Service {
|
|
|
263
263
|
"option-data": [
|
|
264
264
|
{
|
|
265
265
|
name: "routers",
|
|
266
|
-
data: network.gateway.
|
|
266
|
+
data: network.gateway.address
|
|
267
267
|
}
|
|
268
268
|
],
|
|
269
269
|
reservations
|
|
@@ -288,8 +288,8 @@ export class DHCPService extends Service {
|
|
|
288
288
|
{
|
|
289
289
|
name: "dns-servers",
|
|
290
290
|
data: dnsServerEndpoints
|
|
291
|
-
.filter(endpoint => isIPv6(endpoint.
|
|
292
|
-
.map(endpoint => endpoint.
|
|
291
|
+
.filter(endpoint => isIPv6(endpoint.address))
|
|
292
|
+
.map(endpoint => endpoint.address)
|
|
293
293
|
.join(",")
|
|
294
294
|
}
|
|
295
295
|
],
|
package/src/services/dns.mjs
CHANGED
|
@@ -295,12 +295,12 @@ async function generateZoneDefs(dns, location, packageData) {
|
|
|
295
295
|
|
|
296
296
|
zone.records.add(DNSRecord("location", "TXT", host.location.name));
|
|
297
297
|
|
|
298
|
-
for (const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
)
|
|
303
|
-
|
|
298
|
+
for (const na of host.networkAddresses(
|
|
299
|
+
na => na.networkInterface.kind != "loopback"
|
|
300
|
+
)) {
|
|
301
|
+
zone.records.add(
|
|
302
|
+
DNSRecord("@", na.family === "IPv6" ? "AAAA" : "A", na.address)
|
|
303
|
+
);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -311,11 +311,11 @@ async function generateZoneDefs(dns, location, packageData) {
|
|
|
311
311
|
addHook(
|
|
312
312
|
packageData.properties.hooks,
|
|
313
313
|
"post_upgrade",
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
314
|
+
// `rm -f ${foreignZones.map(zone => `/var/lib/named/${zone.file}.jnl`)}\n` +
|
|
315
|
+
// "systemctl try-reload-or-restart named\n" +
|
|
316
|
+
`/usr/bin/named-hostname-info ${foreignZones
|
|
317
|
+
.map(zone => zone.id)
|
|
318
|
+
.join(" ")}|/usr/bin/named-hostname-update`
|
|
319
319
|
);
|
|
320
320
|
}
|
|
321
321
|
|
|
@@ -366,7 +366,10 @@ async function generateZoneDefs(dns, location, packageData) {
|
|
|
366
366
|
networkInterface,
|
|
367
367
|
domainNames
|
|
368
368
|
} of location.networkAddresses()) {
|
|
369
|
-
if (
|
|
369
|
+
if (
|
|
370
|
+
!dns.exclude.has(networkInterface.network) &&
|
|
371
|
+
!dns.excludeInterfaceKinds.has(networkInterface.kind)
|
|
372
|
+
) {
|
|
370
373
|
const host = networkInterface.host;
|
|
371
374
|
if (
|
|
372
375
|
!addresses.has(address) &&
|
package/src/services/ntp.mjs
CHANGED
package/types/cluster.d.mts
CHANGED
|
@@ -294,12 +294,12 @@ export class Cluster extends Host {
|
|
|
294
294
|
collection: boolean;
|
|
295
295
|
writeable: boolean;
|
|
296
296
|
};
|
|
297
|
-
|
|
297
|
+
addresses: {
|
|
298
298
|
type: string;
|
|
299
299
|
collection: boolean;
|
|
300
300
|
writeable: boolean;
|
|
301
301
|
};
|
|
302
|
-
|
|
302
|
+
address: {
|
|
303
303
|
type: string;
|
|
304
304
|
collection: boolean;
|
|
305
305
|
writeable: boolean;
|
|
@@ -127,12 +127,12 @@ export class ExtraSourceService extends Service {
|
|
|
127
127
|
collection: boolean;
|
|
128
128
|
writeable: boolean;
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
addresses: {
|
|
131
131
|
type: string;
|
|
132
132
|
collection: boolean;
|
|
133
133
|
writeable: boolean;
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
address: {
|
|
136
136
|
type: string;
|
|
137
137
|
collection: boolean;
|
|
138
138
|
writeable: boolean;
|
package/types/host.d.mts
CHANGED
|
@@ -159,12 +159,12 @@ export class Host extends Base {
|
|
|
159
159
|
collection: boolean;
|
|
160
160
|
writeable: boolean;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
addresses: {
|
|
163
163
|
type: string;
|
|
164
164
|
collection: boolean;
|
|
165
165
|
writeable: boolean;
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
address: {
|
|
168
168
|
type: string;
|
|
169
169
|
collection: boolean;
|
|
170
170
|
writeable: boolean;
|
|
@@ -233,8 +233,8 @@ export class Host extends Base {
|
|
|
233
233
|
set networkInterfaces(networkInterface: Map<any, any>);
|
|
234
234
|
get networkInterfaces(): Map<any, any>;
|
|
235
235
|
networkAddresses(filter: any): Generator<any, void, any>;
|
|
236
|
-
get
|
|
237
|
-
get
|
|
236
|
+
get address(): any;
|
|
237
|
+
get addresses(): any[];
|
|
238
238
|
publicKey(type?: string): Promise<string>;
|
|
239
239
|
preparePackages(dir: any): AsyncGenerator<{
|
|
240
240
|
dir: any;
|
|
@@ -93,12 +93,12 @@ export namespace NetworkInterfaceTypeDefinition {
|
|
|
93
93
|
collection: boolean;
|
|
94
94
|
writeable: boolean;
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
addresses: {
|
|
97
97
|
type: string;
|
|
98
98
|
collection: boolean;
|
|
99
99
|
writeable: boolean;
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
address: {
|
|
102
102
|
type: string;
|
|
103
103
|
collection: boolean;
|
|
104
104
|
writeable: boolean;
|
|
@@ -252,12 +252,12 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
252
252
|
collection: boolean;
|
|
253
253
|
writeable: boolean;
|
|
254
254
|
};
|
|
255
|
-
|
|
255
|
+
addresses: {
|
|
256
256
|
type: string;
|
|
257
257
|
collection: boolean;
|
|
258
258
|
writeable: boolean;
|
|
259
259
|
};
|
|
260
|
-
|
|
260
|
+
address: {
|
|
261
261
|
type: string;
|
|
262
262
|
collection: boolean;
|
|
263
263
|
writeable: boolean;
|
|
@@ -450,12 +450,12 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
|
450
450
|
collection: boolean;
|
|
451
451
|
writeable: boolean;
|
|
452
452
|
};
|
|
453
|
-
|
|
453
|
+
addresses: {
|
|
454
454
|
type: string;
|
|
455
455
|
collection: boolean;
|
|
456
456
|
writeable: boolean;
|
|
457
457
|
};
|
|
458
|
-
|
|
458
|
+
address: {
|
|
459
459
|
type: string;
|
|
460
460
|
collection: boolean;
|
|
461
461
|
writeable: boolean;
|
|
@@ -609,12 +609,12 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
|
609
609
|
collection: boolean;
|
|
610
610
|
writeable: boolean;
|
|
611
611
|
};
|
|
612
|
-
|
|
612
|
+
addresses: {
|
|
613
613
|
type: string;
|
|
614
614
|
collection: boolean;
|
|
615
615
|
writeable: boolean;
|
|
616
616
|
};
|
|
617
|
-
|
|
617
|
+
address: {
|
|
618
618
|
type: string;
|
|
619
619
|
collection: boolean;
|
|
620
620
|
writeable: boolean;
|
|
@@ -718,8 +718,8 @@ declare class SkeletonNetworkInterface extends Base {
|
|
|
718
718
|
*/
|
|
719
719
|
networkAddresses(filter?: object): Iterable<NetworkAddress>;
|
|
720
720
|
networkAddress(filter: any): NetworkAddress;
|
|
721
|
-
get
|
|
722
|
-
get
|
|
721
|
+
get address(): any;
|
|
722
|
+
get addresses(): any[];
|
|
723
723
|
}
|
|
724
724
|
import { Subnet } from "./subnet.mjs";
|
|
725
725
|
import { Base } from "./base.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export function addresses(networkAddresses: any): any[];
|
|
1
2
|
export function cidrAddresses(networkAddresses: any): any[];
|
|
2
3
|
export namespace networkProperties {
|
|
3
4
|
export namespace scope {
|
|
@@ -109,7 +110,7 @@ export namespace networkAddressProperties {
|
|
|
109
110
|
let writeable_11: boolean;
|
|
110
111
|
export { writeable_11 as writeable };
|
|
111
112
|
}
|
|
112
|
-
namespace
|
|
113
|
+
namespace addresses {
|
|
113
114
|
let type_12: string;
|
|
114
115
|
export { type_12 as type };
|
|
115
116
|
let collection_12: boolean;
|
|
@@ -117,7 +118,7 @@ export namespace networkAddressProperties {
|
|
|
117
118
|
let writeable_12: boolean;
|
|
118
119
|
export { writeable_12 as writeable };
|
|
119
120
|
}
|
|
120
|
-
namespace
|
|
121
|
+
namespace address {
|
|
121
122
|
let type_13: string;
|
|
122
123
|
export { type_13 as type };
|
|
123
124
|
let collection_13: boolean;
|
package/types/service.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function serviceAddresses(sources: any, filter: any, addressType?: string, addressFilter?: (a: any) => boolean): any[];
|
|
2
|
-
export function serviceEndpoints(sources: any, filter: any): any[];
|
|
2
|
+
export function serviceEndpoints(sources: any, filter: any, endpointFilter: any): any[];
|
|
3
3
|
export namespace endpointProperties {
|
|
4
4
|
export namespace port {
|
|
5
5
|
let type: string;
|
|
@@ -159,12 +159,12 @@ export namespace ServiceTypeDefinition {
|
|
|
159
159
|
collection: boolean;
|
|
160
160
|
writeable: boolean;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
addresses: {
|
|
163
163
|
type: string;
|
|
164
164
|
collection: boolean;
|
|
165
165
|
writeable: boolean;
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
address: {
|
|
168
168
|
type: string;
|
|
169
169
|
collection: boolean;
|
|
170
170
|
writeable: boolean;
|
|
@@ -284,12 +284,12 @@ export class Service extends Base {
|
|
|
284
284
|
collection: boolean;
|
|
285
285
|
writeable: boolean;
|
|
286
286
|
};
|
|
287
|
-
|
|
287
|
+
addresses: {
|
|
288
288
|
type: string;
|
|
289
289
|
collection: boolean;
|
|
290
290
|
writeable: boolean;
|
|
291
291
|
};
|
|
292
|
-
|
|
292
|
+
address: {
|
|
293
293
|
type: string;
|
|
294
294
|
collection: boolean;
|
|
295
295
|
writeable: boolean;
|
|
@@ -308,12 +308,11 @@ export class Service extends Base {
|
|
|
308
308
|
get server(): any;
|
|
309
309
|
get domainName(): any;
|
|
310
310
|
get ipAddressOrDomainName(): any;
|
|
311
|
-
get
|
|
312
|
-
get
|
|
311
|
+
get addresses(): any;
|
|
312
|
+
get address(): any;
|
|
313
313
|
set ipAddresses(value: any);
|
|
314
314
|
get networks(): any;
|
|
315
|
-
|
|
316
|
-
findEndpoints(filter: any): Generator<any, void, any>;
|
|
315
|
+
endpoints(filter: any): any[];
|
|
317
316
|
set alias(value: any);
|
|
318
317
|
get alias(): any;
|
|
319
318
|
set port(value: any);
|
|
@@ -337,9 +336,9 @@ export class Endpoint {
|
|
|
337
336
|
toString(): string;
|
|
338
337
|
get socketAddress(): string;
|
|
339
338
|
get hostName(): any;
|
|
339
|
+
set address(value: any);
|
|
340
340
|
get address(): any;
|
|
341
|
-
|
|
342
|
-
get rawAddress(): any;
|
|
341
|
+
get family(): any;
|
|
343
342
|
#private;
|
|
344
343
|
}
|
|
345
344
|
export function sortByPriority(a: any, b: any): number;
|
|
@@ -113,12 +113,12 @@ export class DHCPService extends Service {
|
|
|
113
113
|
collection: boolean;
|
|
114
114
|
writeable: boolean;
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
addresses: {
|
|
117
117
|
type: string;
|
|
118
118
|
collection: boolean;
|
|
119
119
|
writeable: boolean;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
address: {
|
|
122
122
|
type: string;
|
|
123
123
|
collection: boolean;
|
|
124
124
|
writeable: boolean;
|
|
@@ -238,12 +238,12 @@ export class DHCPService extends Service {
|
|
|
238
238
|
collection: boolean;
|
|
239
239
|
writeable: boolean;
|
|
240
240
|
};
|
|
241
|
-
|
|
241
|
+
addresses: {
|
|
242
242
|
type: string;
|
|
243
243
|
collection: boolean;
|
|
244
244
|
writeable: boolean;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
address: {
|
|
247
247
|
type: string;
|
|
248
248
|
collection: boolean;
|
|
249
249
|
writeable: boolean;
|
package/types/services/dns.d.mts
CHANGED
|
@@ -113,12 +113,12 @@ export class DNSService extends ExtraSourceService {
|
|
|
113
113
|
collection: boolean;
|
|
114
114
|
writeable: boolean;
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
addresses: {
|
|
117
117
|
type: string;
|
|
118
118
|
collection: boolean;
|
|
119
119
|
writeable: boolean;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
address: {
|
|
122
122
|
type: string;
|
|
123
123
|
collection: boolean;
|
|
124
124
|
writeable: boolean;
|
|
@@ -241,12 +241,12 @@ export class DNSService extends ExtraSourceService {
|
|
|
241
241
|
collection: boolean;
|
|
242
242
|
writeable: boolean;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
addresses: {
|
|
245
245
|
type: string;
|
|
246
246
|
collection: boolean;
|
|
247
247
|
writeable: boolean;
|
|
248
248
|
};
|
|
249
|
-
|
|
249
|
+
address: {
|
|
250
250
|
type: string;
|
|
251
251
|
collection: boolean;
|
|
252
252
|
writeable: boolean;
|
package/types/services/ntp.d.mts
CHANGED
|
@@ -113,12 +113,12 @@ export class NTPService extends ExtraSourceService {
|
|
|
113
113
|
collection: boolean;
|
|
114
114
|
writeable: boolean;
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
addresses: {
|
|
117
117
|
type: string;
|
|
118
118
|
collection: boolean;
|
|
119
119
|
writeable: boolean;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
address: {
|
|
122
122
|
type: string;
|
|
123
123
|
collection: boolean;
|
|
124
124
|
writeable: boolean;
|
|
@@ -241,12 +241,12 @@ export class NTPService extends ExtraSourceService {
|
|
|
241
241
|
collection: boolean;
|
|
242
242
|
writeable: boolean;
|
|
243
243
|
};
|
|
244
|
-
|
|
244
|
+
addresses: {
|
|
245
245
|
type: string;
|
|
246
246
|
collection: boolean;
|
|
247
247
|
writeable: boolean;
|
|
248
248
|
};
|
|
249
|
-
|
|
249
|
+
address: {
|
|
250
250
|
type: string;
|
|
251
251
|
collection: boolean;
|
|
252
252
|
writeable: boolean;
|