pmcf 2.33.7 → 2.35.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.33.7",
3
+ "version": "2.35.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/endpoint.mjs CHANGED
@@ -17,6 +17,10 @@ export class Endpoint {
17
17
  return this.networkAddress.networkInterface.hostName;
18
18
  }
19
19
 
20
+ get domainName() {
21
+ return this.networkAddress.networkInterface.domainName;
22
+ }
23
+
20
24
  get address() {
21
25
  return this.networkAddress.address;
22
26
  }
@@ -29,3 +33,23 @@ export class Endpoint {
29
33
  return this.networkAddress.networkInterface;
30
34
  }
31
35
  }
36
+
37
+ export class DomainNameEndpoint {
38
+ constructor(service, domainName, data) {
39
+ this.service = service;
40
+ this.domainName = domainName;
41
+ Object.assign(this, data);
42
+ }
43
+
44
+ get networkInterface() {
45
+ return {};
46
+ }
47
+
48
+ get address() {
49
+ return this.domainName;
50
+ }
51
+
52
+ toString() {
53
+ return `${this.address}[${this.port}]`;
54
+ }
55
+ }
package/src/host.mjs CHANGED
@@ -3,7 +3,12 @@ import { join } from "node:path";
3
3
  import { FileContentProvider } from "npm-pkgbuild";
4
4
  import { ServiceOwner, Base } from "pmcf";
5
5
  import { networkAddressProperties, addresses } from "./network-support.mjs";
6
- import { domainFromDominName, domainName } from "./utils.mjs";
6
+ import {
7
+ domainFromDominName,
8
+ domainName,
9
+ writeLines,
10
+ sectionLines
11
+ } from "./utils.mjs";
7
12
  import { objectFilter } from "./filter.mjs";
8
13
  import { addType, types } from "./types.mjs";
9
14
  import { loadHooks } from "./hooks.mjs";
@@ -484,6 +489,13 @@ export class Host extends ServiceOwner {
484
489
  await generateMachineInfo(this, packageData);
485
490
  await generateKnownHosts(this.owner.hosts(), join(dir, "root", ".ssh"));
486
491
 
492
+ for (const service of this.services) {
493
+ if (service.systemdConfig) {
494
+ const { name, content } = service.systemdConfig(this.name);
495
+ await writeLines(dir, name, sectionLines(...content));
496
+ }
497
+ }
498
+
487
499
  yield packageData;
488
500
  }
489
501
  }
package/src/location.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  import { FileContentProvider } from "npm-pkgbuild";
2
- import { Owner } from "./owner.mjs";
2
+ import { Owner } from "pmcf";
3
3
  import { addType } from "./types.mjs";
4
- import { writeLines, sectionLines } from "./utils.mjs";
5
4
  import { loadHooks } from "./hooks.mjs";
6
5
 
7
6
  const LocationTypeDefinition = {
@@ -69,21 +68,6 @@ export class Location extends Owner {
69
68
  }
70
69
  };
71
70
 
72
- const configs = [
73
- { type: "dns" },
74
- { type: "systemd-timesyncd" },
75
- { type: "systemd-journal" }
76
- ];
77
-
78
- for (const cfg of configs) {
79
- const service = this.findService(cfg);
80
-
81
- if (service) {
82
- const { name, content } = service.systemdConfig(this.name);
83
- await writeLines(dir, name, sectionLines(...content));
84
- }
85
- }
86
-
87
71
  yield packageData;
88
72
  }
89
73
  }
package/src/module.mjs CHANGED
@@ -15,10 +15,12 @@ export * from "./network-interfaces/wlan.mjs";
15
15
  export * from "./network-interfaces/wireguard.mjs";
16
16
  export * from "./host.mjs";
17
17
  export * from "./service.mjs";
18
+ export * from "./extra-source-service.mjs";
18
19
  export * from "./endpoint.mjs";
19
20
  export * from "./services/dns.mjs";
20
21
  export * from "./services/ntp.mjs";
21
22
  export * from "./services/dhcp.mjs";
22
23
  export * from "./services/systemd-journal.mjs";
23
24
  export * from "./services/systemd-timesyncd.mjs";
25
+ export * from "./services/systemd-resolved.mjs";
24
26
  export * from "./types.mjs";
@@ -42,6 +42,10 @@ export class SkeletonNetworkInterface extends ServiceOwner {
42
42
  return this;
43
43
  }
44
44
 
45
+ get domainName() {
46
+ return this.host?.domainName;
47
+ }
48
+
45
49
  get domainNames() {
46
50
  return new Set();
47
51
  }
package/src/service.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { isLocalhost } from "ip-utilties";
2
- import { Base, Host, Endpoint } from "pmcf";
1
+ import { Base, Host, Endpoint, DomainNameEndpoint } from "pmcf";
3
2
  import { addType } from "./types.mjs";
4
3
  import { asArray } from "./utils.mjs";
5
4
  import { networkAddressProperties } from "./network-support.mjs";
@@ -199,7 +198,7 @@ export class Service extends Base {
199
198
  }
200
199
  ];
201
200
 
202
- const result = [...this.host.networkAddresses()]
201
+ let result = [...this.host.networkAddresses()]
203
202
  .map(na =>
204
203
  data.map(
205
204
  d =>
@@ -211,6 +210,12 @@ export class Service extends Base {
211
210
  )
212
211
  .flat();
213
212
 
213
+ if (result.length === 0) {
214
+ result = data.map(
215
+ d => new DomainNameEndpoint(this, this.domainName, { ...d, ...local })
216
+ );
217
+ }
218
+
214
219
  return filter ? result.filter(filter) : result;
215
220
  }
216
221
 
@@ -322,26 +327,15 @@ export class Service extends Base {
322
327
 
323
328
  export const sortByPriority = (a, b) => a.priority - b.priority;
324
329
 
325
- export function serviceAddresses(
326
- sources,
327
- filter,
328
- addressType = "addresses",
329
- addressFilter = a => !isLocalhost(a)
330
- ) {
331
- return asArray(sources)
332
- .map(ft => Array.from(ft.findServices(filter)))
330
+ export function serviceEndpoints(sources, options = {}) {
331
+ const all = asArray(sources)
332
+ .map(ft => Array.from(ft.findServices(options.services)))
333
333
  .flat()
334
334
  .sort(sortByPriority)
335
- .map(s => s[addressType])
336
- .flat()
337
- .filter(addressFilter);
338
- }
339
-
340
- export function serviceEndpoints(sources, filter, endpointFilter) {
341
- return asArray(sources)
342
- .map(ft => Array.from(ft.findServices(filter)))
343
- .flat()
344
- .sort(sortByPriority)
345
- .map(service => service.endpoints(endpointFilter))
335
+ .map(service => service.endpoints(options.endpoints))
346
336
  .flat();
337
+
338
+ const res = new Set(options.select ? all.map(options.select) : all);
339
+
340
+ return options.join ? [...res].join(options.join) : res;
347
341
  }
@@ -70,14 +70,13 @@ export class DHCPService extends Service {
70
70
 
71
71
  console.log("kea", host.name, network.name);
72
72
 
73
- const dnsServerEndpoints = serviceEndpoints(
74
- network,
75
- {
73
+ const dnsServerEndpoints = serviceEndpoints(network, {
74
+ services: {
76
75
  type: "dns",
77
76
  priority: "<10"
78
77
  },
79
- endpoint => endpoint.networkInterface.kind !== "loopback"
80
- );
78
+ endpoints: endpoint => endpoint.networkInterface.kind !== "loopback"
79
+ });
81
80
 
82
81
  const packageData = {
83
82
  dir,
@@ -9,13 +9,10 @@ import {
9
9
  dnsRecordTypeForAddressFamily,
10
10
  sortZoneRecords
11
11
  } from "../dns-utils.mjs";
12
- import { Endpoint, serviceEndpoints } from "pmcf";
12
+ import { ExtraSourceService, Endpoint, serviceEndpoints } from "pmcf";
13
13
  import { addType } from "../types.mjs";
14
- import { ServiceTypeDefinition, serviceAddresses } from "../service.mjs";
15
- import {
16
- ExtraSourceService,
17
- ExtraSourceServiceTypeDefinition
18
- } from "../extra-source-service.mjs";
14
+ import { ServiceTypeDefinition } from "../service.mjs";
15
+ import { ExtraSourceServiceTypeDefinition } from "../extra-source-service.mjs";
19
16
  import { addresses } from "../network-support.mjs";
20
17
  import { addHook } from "../hooks.mjs";
21
18
 
@@ -90,8 +87,6 @@ const statisticsEndpoint = {
90
87
  tls: false
91
88
  };
92
89
 
93
- const DNS_SERVICE_FILTER = { type: DNSServiceTypeDefinition.name };
94
-
95
90
  function addressList(objects) {
96
91
  return Array.from(objects).map(object => {
97
92
  switch (typeof object) {
@@ -210,29 +205,6 @@ export class DNSService extends ExtraSourceService {
210
205
  return this._excludeInterfaceKinds;
211
206
  }
212
207
 
213
- systemdConfig(name) {
214
- return {
215
- name: `etc/systemd/resolved.conf.d/${name}.conf`,
216
- content: [
217
- "Resolve",
218
- {
219
- DNS: serviceAddresses(this, {
220
- ...DNS_SERVICE_FILTER,
221
- priority: "<10"
222
- }).join(" "),
223
- FallbackDNS: serviceAddresses(this, {
224
- ...DNS_SERVICE_FILTER,
225
- priority: ">=10"
226
- }).join(" "),
227
- Domains: [...this.localDomains].join(" "),
228
- DNSSEC: "no",
229
- MulticastDNS: this.network.multicastDNS ? "yes" : "no",
230
- LLMNR: "no"
231
- }
232
- ]
233
- };
234
- }
235
-
236
208
  async *preparePackages(dir) {
237
209
  const location = this.owner.owner;
238
210
  const name = location.name;
@@ -248,9 +220,10 @@ export class DNSService extends ExtraSourceService {
248
220
  }
249
221
  };
250
222
 
251
- const forwarders = new Set(
252
- serviceEndpoints(this.source, DNS_SERVICE_FILTER).map(e => e.address)
253
- );
223
+ const forwarders = serviceEndpoints(this.source, {
224
+ services: { type: "dns", priority: ">=10" },
225
+ select: e => e.address
226
+ });
254
227
 
255
228
  if (forwarders.size) {
256
229
  await writeLines(
@@ -309,7 +282,7 @@ export class DNSService extends ExtraSourceService {
309
282
 
310
283
  async function generateZoneDefs(dns, location, packageData) {
311
284
  const ttl = dns.recordTTL;
312
- const nameService = dns.findService(DNS_SERVICE_FILTER);
285
+ const nameService = dns.findService({ type: "dns", priority: "<10" });
313
286
  const rname = dns.administratorEmail.replace(/@/, ".");
314
287
 
315
288
  const SOARecord = DNSRecord(
@@ -24,8 +24,6 @@ const NTPServiceTypeDefinition = {
24
24
  }
25
25
  };
26
26
 
27
- const NTP_SERVICE_FILTER = { type: NTPServiceTypeDefinition.name };
28
-
29
27
  export class NTPService extends ExtraSourceService {
30
28
  static {
31
29
  addType(this);
@@ -64,19 +62,19 @@ export class NTPService extends ExtraSourceService {
64
62
  };
65
63
 
66
64
  const lines = [
67
- ...serviceEndpoints(
68
- this,
69
- {
70
- ...NTP_SERVICE_FILTER,
65
+ ...serviceEndpoints(this, {
66
+ services: {
67
+ type: "ntp",
71
68
  priority: ">=10"
72
69
  },
73
- e => e.family === "IPv4" && e.networkInterface.kind !== "loopback"
74
- ).map(
75
- endpoint =>
70
+ endpoints: e =>
71
+ e.family === "IPv4" && e.networkInterface.kind !== "loopback",
72
+
73
+ select: endpoint =>
76
74
  `${endpoint.service.isPool ? "pool" : "server"} ${
77
75
  endpoint.address
78
76
  } iburst`
79
- ),
77
+ }),
80
78
  `mailonchange ${this.administratorEmail} 0.5`,
81
79
  "local stratum 10",
82
80
  "leapsectz right/UTC",
@@ -0,0 +1,64 @@
1
+ import {
2
+ ExtraSourceService,
3
+ ServiceTypeDefinition,
4
+ serviceEndpoints
5
+ } from "pmcf";
6
+ import { addType } from "../types.mjs";
7
+
8
+ const SystemdResolvedServiceTypeDefinition = {
9
+ name: "systemd-resolved",
10
+ specializationOf: ServiceTypeDefinition,
11
+ owners: ServiceTypeDefinition.owners,
12
+ extends: ServiceTypeDefinition,
13
+ priority: 0.1,
14
+ properties: {}
15
+ };
16
+
17
+ export class SystemdResolvedService extends ExtraSourceService {
18
+ static {
19
+ addType(this);
20
+ }
21
+
22
+ static get typeDefinition() {
23
+ return SystemdResolvedServiceTypeDefinition;
24
+ }
25
+
26
+ constructor(owner, data) {
27
+ super(owner, data);
28
+ this.read(data, SystemdResolvedServiceTypeDefinition);
29
+ }
30
+
31
+ get type() {
32
+ return SystemdResolvedServiceTypeDefinition.name;
33
+ }
34
+
35
+ get systemdServices() {
36
+ return SystemdResolvedServiceTypeDefinition.name;
37
+ }
38
+
39
+ systemdConfig(name) {
40
+ const options = priority => {
41
+ return {
42
+ services: { type: "dns", priority },
43
+ endpoints: e => e.networkInterface.kind !== "loopback",
44
+ select: endpoint => endpoint.address,
45
+ join: " "
46
+ };
47
+ };
48
+
49
+ return {
50
+ name: `etc/systemd/resolved.conf.d/${name}.conf`,
51
+ content: [
52
+ "Resolve",
53
+ {
54
+ DNS: serviceEndpoints(this, options("<10")),
55
+ FallbackDNS: serviceEndpoints(this, options(">=10")),
56
+ Domains: [...this.localDomains].join(" "),
57
+ DNSSEC: "no",
58
+ MulticastDNS: this.network.multicastDNS ? "yes" : "no",
59
+ LLMNR: "no"
60
+ }
61
+ ]
62
+ };
63
+ }
64
+ }
@@ -1,6 +1,8 @@
1
- import { Service, ServiceTypeDefinition } from "pmcf";
2
- import { serviceAddresses } from "../service.mjs";
3
-
1
+ import {
2
+ ExtraSourceService,
3
+ ServiceTypeDefinition,
4
+ serviceEndpoints
5
+ } from "pmcf";
4
6
  import { addType } from "../types.mjs";
5
7
 
6
8
  const SystemdTimesyncdServiceTypeDefinition = {
@@ -12,7 +14,7 @@ const SystemdTimesyncdServiceTypeDefinition = {
12
14
  properties: {}
13
15
  };
14
16
 
15
- export class SystemdTimesyncdService extends Service {
17
+ export class SystemdTimesyncdService extends ExtraSourceService {
16
18
  static {
17
19
  addType(this);
18
20
  }
@@ -40,15 +42,16 @@ export class SystemdTimesyncdService extends Service {
40
42
  content: [
41
43
  "Time",
42
44
  {
43
- NTP: serviceAddresses(
44
- this,
45
- {
45
+ NTP: serviceEndpoints(this, {
46
+ services: {
46
47
  type: "ntp",
47
48
  priority: "<20"
48
49
  },
49
- "domainName",
50
- () => true
51
- ).join(" ")
50
+ endpoints: endpoint =>
51
+ endpoint.networkInterface.kind !== "loopback",
52
+ select: endpoint => endpoint.domainName,
53
+ join: " "
54
+ })
52
55
  }
53
56
  ]
54
57
  };
@@ -5,7 +5,16 @@ export class Endpoint {
5
5
  toString(): string;
6
6
  get socketAddress(): string;
7
7
  get hostName(): any;
8
+ get domainName(): any;
8
9
  get address(): any;
9
10
  get family(): any;
10
11
  get networkInterface(): any;
11
12
  }
13
+ export class DomainNameEndpoint {
14
+ constructor(service: any, domainName: any, data: any);
15
+ service: any;
16
+ domainName: any;
17
+ get networkInterface(): {};
18
+ get address(): any;
19
+ toString(): string;
20
+ }
@@ -292,5 +292,5 @@ export class Location extends Owner {
292
292
  };
293
293
  }, void, unknown>;
294
294
  }
295
- import { Owner } from "./owner.mjs";
295
+ import { Owner } from "pmcf";
296
296
  import { FileContentProvider } from "npm-pkgbuild";
@@ -15,10 +15,12 @@ export * from "./network-interfaces/wlan.mjs";
15
15
  export * from "./network-interfaces/wireguard.mjs";
16
16
  export * from "./host.mjs";
17
17
  export * from "./service.mjs";
18
+ export * from "./extra-source-service.mjs";
18
19
  export * from "./endpoint.mjs";
19
20
  export * from "./services/dns.mjs";
20
21
  export * from "./services/ntp.mjs";
21
22
  export * from "./services/dhcp.mjs";
22
23
  export * from "./services/systemd-journal.mjs";
23
24
  export * from "./services/systemd-timesyncd.mjs";
25
+ export * from "./services/systemd-resolved.mjs";
24
26
  export * from "./types.mjs";
@@ -7,6 +7,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
7
7
  get host(): Host;
8
8
  hosts(): Generator<any, void, any>;
9
9
  get network_interface(): this;
10
+ get domainName(): any;
10
11
  get domainNames(): Set<any>;
11
12
  matches(other: any): boolean;
12
13
  set network(network: any);
@@ -1,5 +1,4 @@
1
- export function serviceAddresses(sources: any, filter: any, addressType?: string, addressFilter?: (a: any) => boolean): any[];
2
- export function serviceEndpoints(sources: any, filter: any, endpointFilter: any): any[];
1
+ export function serviceEndpoints(sources: any, options?: {}): string | Set<any>;
3
2
  export namespace endpointProperties {
4
3
  export namespace port {
5
4
  let type: string;
@@ -377,17 +377,6 @@ export class DNSService extends ExtraSourceService {
377
377
  get exclude(): Set<any>;
378
378
  set excludeInterfaceKinds(value: Set<any>);
379
379
  get excludeInterfaceKinds(): Set<any>;
380
- systemdConfig(name: any): {
381
- name: string;
382
- content: (string | {
383
- DNS: string;
384
- FallbackDNS: string;
385
- Domains: string;
386
- DNSSEC: string;
387
- MulticastDNS: string;
388
- LLMNR: string;
389
- })[];
390
- };
391
380
  preparePackages(dir: any): AsyncGenerator<{
392
381
  dir: string;
393
382
  sources: FileContentProvider[];
@@ -399,5 +388,5 @@ export class DNSService extends ExtraSourceService {
399
388
  };
400
389
  }, void, unknown>;
401
390
  }
402
- import { ExtraSourceService } from "../extra-source-service.mjs";
391
+ import { ExtraSourceService } from "pmcf";
403
392
  import { FileContentProvider } from "npm-pkgbuild";
@@ -0,0 +1,269 @@
1
+ export class SystemdResolvedService extends ExtraSourceService {
2
+ static get typeDefinition(): {
3
+ name: string;
4
+ specializationOf: {
5
+ name: string;
6
+ owners: string[];
7
+ priority: number;
8
+ extends: {
9
+ name: string;
10
+ owners: any[];
11
+ properties: {
12
+ owner: {
13
+ type: string;
14
+ collection: boolean;
15
+ writeable: boolean;
16
+ };
17
+ type: {
18
+ type: string;
19
+ collection: boolean;
20
+ writeable: boolean;
21
+ };
22
+ name: {
23
+ type: string;
24
+ collection: boolean;
25
+ identifier: boolean;
26
+ writeable: boolean;
27
+ };
28
+ description: {
29
+ type: string;
30
+ collection: boolean;
31
+ writeable: boolean;
32
+ };
33
+ priority: {
34
+ type: string;
35
+ collection: boolean;
36
+ writeable: boolean;
37
+ };
38
+ directory: {
39
+ type: string;
40
+ collection: boolean;
41
+ writeable: boolean;
42
+ };
43
+ packaging: {
44
+ type: string;
45
+ collection: boolean;
46
+ writeable: boolean;
47
+ };
48
+ tags: {
49
+ type: string;
50
+ collection: boolean;
51
+ writeable: boolean;
52
+ };
53
+ };
54
+ };
55
+ specializations: {};
56
+ factoryFor(owner: any, value: any): any;
57
+ properties: {
58
+ ipAddresses: {
59
+ type: string;
60
+ collection: boolean;
61
+ writeable: boolean;
62
+ };
63
+ alias: {
64
+ type: string;
65
+ collection: boolean;
66
+ writeable: boolean;
67
+ };
68
+ weight: {
69
+ type: string;
70
+ collection: boolean;
71
+ writeable: boolean;
72
+ default: number;
73
+ };
74
+ systemd: {
75
+ type: string;
76
+ collection: boolean;
77
+ writeable: boolean;
78
+ };
79
+ port: {
80
+ type: string;
81
+ collection: boolean;
82
+ writeable: boolean;
83
+ };
84
+ protocol: {
85
+ type: string;
86
+ collection: boolean;
87
+ writeable: boolean;
88
+ values: string[];
89
+ };
90
+ type: {
91
+ type: string;
92
+ collection: boolean;
93
+ writeable: boolean;
94
+ };
95
+ tls: {
96
+ type: string;
97
+ collection: boolean;
98
+ writeable: boolean;
99
+ default: boolean;
100
+ };
101
+ hostName: {
102
+ type: string;
103
+ collection: boolean;
104
+ writeable: boolean;
105
+ };
106
+ cidrAddresses: {
107
+ type: string;
108
+ collection: boolean;
109
+ writeable: boolean;
110
+ };
111
+ cidrAddress: {
112
+ type: string;
113
+ collection: boolean;
114
+ writeable: boolean;
115
+ };
116
+ addresses: {
117
+ type: string;
118
+ collection: boolean;
119
+ writeable: boolean;
120
+ };
121
+ address: {
122
+ type: string;
123
+ collection: boolean;
124
+ writeable: boolean;
125
+ };
126
+ };
127
+ };
128
+ owners: string[];
129
+ extends: {
130
+ name: string;
131
+ owners: string[];
132
+ priority: number;
133
+ extends: {
134
+ name: string;
135
+ owners: any[];
136
+ properties: {
137
+ owner: {
138
+ type: string;
139
+ collection: boolean;
140
+ writeable: boolean;
141
+ };
142
+ type: {
143
+ type: string;
144
+ collection: boolean;
145
+ writeable: boolean;
146
+ };
147
+ name: {
148
+ type: string;
149
+ collection: boolean;
150
+ identifier: boolean;
151
+ writeable: boolean;
152
+ };
153
+ description: {
154
+ type: string;
155
+ collection: boolean;
156
+ writeable: boolean;
157
+ };
158
+ priority: {
159
+ type: string;
160
+ collection: boolean;
161
+ writeable: boolean;
162
+ };
163
+ directory: {
164
+ type: string;
165
+ collection: boolean;
166
+ writeable: boolean;
167
+ };
168
+ packaging: {
169
+ type: string;
170
+ collection: boolean;
171
+ writeable: boolean;
172
+ };
173
+ tags: {
174
+ type: string;
175
+ collection: boolean;
176
+ writeable: boolean;
177
+ };
178
+ };
179
+ };
180
+ specializations: {};
181
+ factoryFor(owner: any, value: any): any;
182
+ properties: {
183
+ ipAddresses: {
184
+ type: string;
185
+ collection: boolean;
186
+ writeable: boolean;
187
+ };
188
+ alias: {
189
+ type: string;
190
+ collection: boolean;
191
+ writeable: boolean;
192
+ };
193
+ weight: {
194
+ type: string;
195
+ collection: boolean;
196
+ writeable: boolean;
197
+ default: number;
198
+ };
199
+ systemd: {
200
+ type: string;
201
+ collection: boolean;
202
+ writeable: boolean;
203
+ };
204
+ port: {
205
+ type: string;
206
+ collection: boolean;
207
+ writeable: boolean;
208
+ };
209
+ protocol: {
210
+ type: string;
211
+ collection: boolean;
212
+ writeable: boolean;
213
+ values: string[];
214
+ };
215
+ type: {
216
+ type: string;
217
+ collection: boolean;
218
+ writeable: boolean;
219
+ };
220
+ tls: {
221
+ type: string;
222
+ collection: boolean;
223
+ writeable: boolean;
224
+ default: boolean;
225
+ };
226
+ hostName: {
227
+ type: string;
228
+ collection: boolean;
229
+ writeable: boolean;
230
+ };
231
+ cidrAddresses: {
232
+ type: string;
233
+ collection: boolean;
234
+ writeable: boolean;
235
+ };
236
+ cidrAddress: {
237
+ type: string;
238
+ collection: boolean;
239
+ writeable: boolean;
240
+ };
241
+ addresses: {
242
+ type: string;
243
+ collection: boolean;
244
+ writeable: boolean;
245
+ };
246
+ address: {
247
+ type: string;
248
+ collection: boolean;
249
+ writeable: boolean;
250
+ };
251
+ };
252
+ };
253
+ priority: number;
254
+ properties: {};
255
+ };
256
+ get systemdServices(): string;
257
+ systemdConfig(name: any): {
258
+ name: string;
259
+ content: (string | {
260
+ DNS: string | Set<any>;
261
+ FallbackDNS: string | Set<any>;
262
+ Domains: string;
263
+ DNSSEC: string;
264
+ MulticastDNS: string;
265
+ LLMNR: string;
266
+ })[];
267
+ };
268
+ }
269
+ import { ExtraSourceService } from "pmcf";
@@ -1,4 +1,4 @@
1
- export class SystemdTimesyncdService extends Service {
1
+ export class SystemdTimesyncdService extends ExtraSourceService {
2
2
  static get typeDefinition(): {
3
3
  name: string;
4
4
  specializationOf: {
@@ -253,13 +253,12 @@ export class SystemdTimesyncdService extends Service {
253
253
  priority: number;
254
254
  properties: {};
255
255
  };
256
- get type(): string;
257
256
  get systemdServices(): string;
258
257
  systemdConfig(name: any): {
259
258
  name: string;
260
259
  content: (string | {
261
- NTP: string;
260
+ NTP: string | Set<any>;
262
261
  })[];
263
262
  };
264
263
  }
265
- import { Service } from "pmcf";
264
+ import { ExtraSourceService } from "pmcf";