pmcf 2.6.5 → 2.6.7
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 +1 -1
- package/src/service.mjs +13 -14
- package/src/services/dhcp.mjs +1 -2
- package/types/service.d.mts +2 -2
- package/types/services/dhcp.d.mts +0 -1
package/package.json
CHANGED
package/src/service.mjs
CHANGED
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
dnsFormatParameters,
|
|
9
9
|
dnsMergeParameters
|
|
10
10
|
} from "./dns-utils.mjs";
|
|
11
|
-
import { DHCPService, DNSService, NTPService } from "./module.mjs";
|
|
12
11
|
|
|
13
12
|
const ServiceTypes = {
|
|
14
13
|
ntp: { endpoints: [{ protocol: "udp", port: 123, tls: false }] },
|
|
@@ -47,7 +46,7 @@ const ServiceTypes = {
|
|
|
47
46
|
smb: { endpoints: [{ protocol: "tcp", port: 445, tls: false }] },
|
|
48
47
|
timemachine: {
|
|
49
48
|
type: "adisk",
|
|
50
|
-
endpoints: [{ protocol: "tcp", tls: false }],
|
|
49
|
+
endpoints: [{ protocol: "tcp", port: 445, tls: false }],
|
|
51
50
|
dnsRecord: {
|
|
52
51
|
type: "TXT",
|
|
53
52
|
parameters: {
|
|
@@ -149,13 +148,13 @@ export class Service extends Base {
|
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
get endpoints() {
|
|
152
|
-
if (this.
|
|
151
|
+
if (!ServiceTypes[this.type]) {
|
|
153
152
|
return [
|
|
154
|
-
{
|
|
153
|
+
{ address: this.rawAddress, port: this._port, tls: false }
|
|
155
154
|
];
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
return ServiceTypes[this.type]
|
|
157
|
+
return ServiceTypes[this.type].endpoints;
|
|
159
158
|
}
|
|
160
159
|
|
|
161
160
|
set port(value) {
|
|
@@ -163,7 +162,15 @@ export class Service extends Base {
|
|
|
163
162
|
}
|
|
164
163
|
|
|
165
164
|
get port() {
|
|
166
|
-
return this.
|
|
165
|
+
return this.endpoints[0].port;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get protocol() {
|
|
169
|
+
return this.endpoints[0].protocol;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
get tls() {
|
|
173
|
+
return this.endpoints[0].tls;
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
set weight(value) {
|
|
@@ -182,14 +189,6 @@ export class Service extends Base {
|
|
|
182
189
|
return this._type ?? this.name;
|
|
183
190
|
}
|
|
184
191
|
|
|
185
|
-
get protocol() {
|
|
186
|
-
return ServiceTypes[this.type]?.endpoints[0].protocol;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
get tls() {
|
|
190
|
-
return ServiceTypes[this.type]?.tls ?? false;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
192
|
get systemdServices() {
|
|
194
193
|
return this._systemd;
|
|
195
194
|
}
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -50,8 +50,7 @@ export class DHCPService extends Service {
|
|
|
50
50
|
name: `kea-${this.location.name}-${host.name}`,
|
|
51
51
|
description: `kea definitions for ${this.fullName}@${name}`,
|
|
52
52
|
access: "private",
|
|
53
|
-
dependencies: ["kea"]
|
|
54
|
-
replaces: [`kea-${name}`] // TODO remove
|
|
53
|
+
dependencies: ["kea>=2.6.1"]
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
56
|
|
package/types/service.d.mts
CHANGED
|
@@ -261,12 +261,12 @@ export class Service extends Base {
|
|
|
261
261
|
get endpoints(): any;
|
|
262
262
|
set port(value: any);
|
|
263
263
|
get port(): any;
|
|
264
|
+
get protocol(): any;
|
|
265
|
+
get tls(): any;
|
|
264
266
|
set weight(value: any);
|
|
265
267
|
get weight(): any;
|
|
266
268
|
set type(value: any);
|
|
267
269
|
get type(): any;
|
|
268
|
-
get protocol(): any;
|
|
269
|
-
get tls(): any;
|
|
270
270
|
get systemdServices(): any;
|
|
271
271
|
dnsRecordsForDomainName(domainName: any, hasSVRRecords: any): {
|
|
272
272
|
key: any;
|