pmcf 2.9.0 → 2.9.2
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/network-support.mjs +3 -3
- package/src/service.mjs +11 -6
- package/src/services/dhcp.mjs +1 -1
- package/src/services/dns.mjs +5 -4
- package/types/extra-source-service.d.mts +2 -0
- package/types/host.d.mts +3 -0
- package/types/network-support.d.mts +6 -0
- package/types/network.d.mts +3 -0
- package/types/service.d.mts +4 -0
- package/types/services/dhcp.d.mts +4 -0
- package/types/services/dns.d.mts +8 -0
- package/types/services/ntp.d.mts +4 -0
package/package.json
CHANGED
package/src/network-support.mjs
CHANGED
|
@@ -19,10 +19,10 @@ export const networkProperties = {
|
|
|
19
19
|
},
|
|
20
20
|
ssid: { type: "string", collection: false, writeable: true },
|
|
21
21
|
psk: { type: "string", collection: false, writeable: true },
|
|
22
|
-
metric: { type: "number", collection: false, writeable: true },
|
|
23
|
-
MTU: { type: "number", collection: false, writeable: true },
|
|
22
|
+
metric: { type: "number", collection: false, writeable: true, default: 1004 },
|
|
23
|
+
MTU: { type: "number", collection: false, writeable: true, default: 1500 },
|
|
24
24
|
gateway: { type: "host", collection: false, writeable: true },
|
|
25
|
-
multicastDNS: { type: "boolean", collection: false, writeable: true }
|
|
25
|
+
multicastDNS: { type: "boolean", collection: false, writeable: true, default: false }
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export const networkAddressProperties = {
|
package/src/service.mjs
CHANGED
|
@@ -88,8 +88,13 @@ export const ServiceTypeDefinition = {
|
|
|
88
88
|
},
|
|
89
89
|
alias: { type: "string", collection: false, writeable: true },
|
|
90
90
|
type: { type: "string", collection: false, writeable: true },
|
|
91
|
-
weight: { type: "number", collection: false, writeable: true },
|
|
92
|
-
tls: {
|
|
91
|
+
weight: { type: "number", collection: false, writeable: true, default: 1 },
|
|
92
|
+
tls: {
|
|
93
|
+
type: "string",
|
|
94
|
+
collection: false,
|
|
95
|
+
writeable: false,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
93
98
|
systemd: { type: "string", collection: true, writeable: true }
|
|
94
99
|
}
|
|
95
100
|
};
|
|
@@ -149,12 +154,12 @@ export class Service extends Base {
|
|
|
149
154
|
|
|
150
155
|
get endpoints() {
|
|
151
156
|
if (!ServiceTypes[this.type]) {
|
|
152
|
-
return [
|
|
153
|
-
{ address: this.rawAddress, port: this._port, tls: false }
|
|
154
|
-
];
|
|
157
|
+
return [{ address: this.rawAddress, port: this._port, tls: false }];
|
|
155
158
|
}
|
|
156
159
|
|
|
157
|
-
return ServiceTypes[this.type].endpoints
|
|
160
|
+
return ServiceTypes[this.type].endpoints.map(e =>
|
|
161
|
+
Object.assign({ address: this.rawAddress }, e)
|
|
162
|
+
);
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
set port(value) {
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -63,7 +63,7 @@ export class DHCPService extends Service {
|
|
|
63
63
|
"interfaces-config": {
|
|
64
64
|
interfaces: [...host.networkInterfaces.values()]
|
|
65
65
|
.filter(ni => ni.kind !== "loopback")
|
|
66
|
-
.map(ni => ni.name)
|
|
66
|
+
.map(ni => `${ni.name}/${ni.rawAddress}`)
|
|
67
67
|
},
|
|
68
68
|
"lease-database": {
|
|
69
69
|
type: "memfile",
|
package/src/services/dns.mjs
CHANGED
|
@@ -27,15 +27,16 @@ const DNSServiceTypeDefinition = {
|
|
|
27
27
|
trusted: { type: "network", collection: true, writeable: true },
|
|
28
28
|
protected: { type: "network", collection: true, writeable: true },
|
|
29
29
|
open: { type: "network", collection: true, writeable: true },
|
|
30
|
-
hasSVRRecords: { type: "boolean", collection: false, writeable: true },
|
|
31
|
-
hasCatalog: { type: "boolean", collection: false, writeable: true },
|
|
30
|
+
hasSVRRecords: { type: "boolean", collection: false, writeable: true, default: false },
|
|
31
|
+
hasCatalog: { type: "boolean", collection: false, writeable: true, default: false },
|
|
32
32
|
hasLinkLocalAdresses: {
|
|
33
33
|
type: "boolean",
|
|
34
34
|
collection: false,
|
|
35
|
-
writeable: true
|
|
35
|
+
writeable: true,
|
|
36
|
+
default: false
|
|
36
37
|
},
|
|
37
38
|
exclude: { type: "network", collection: true, writeable: true },
|
|
38
|
-
notify: { type: "boolean", collection: false, writeable: true },
|
|
39
|
+
notify: { type: "boolean", collection: false, writeable: true, default: false },
|
|
39
40
|
recordTTL: { type: "string", collection: false, writeable: true },
|
|
40
41
|
serial: { type: "number", collection: false, writeable: true },
|
|
41
42
|
refresh: { type: "string", collection: false, writeable: true },
|
|
@@ -99,11 +99,13 @@ export class ExtraSourceService extends Service {
|
|
|
99
99
|
type: string;
|
|
100
100
|
collection: boolean;
|
|
101
101
|
writeable: boolean;
|
|
102
|
+
default: number;
|
|
102
103
|
};
|
|
103
104
|
tls: {
|
|
104
105
|
type: string;
|
|
105
106
|
collection: boolean;
|
|
106
107
|
writeable: boolean;
|
|
108
|
+
default: boolean;
|
|
107
109
|
};
|
|
108
110
|
systemd: {
|
|
109
111
|
type: string;
|
package/types/host.d.mts
CHANGED
|
@@ -392,11 +392,13 @@ export class NetworkInterface extends Base {
|
|
|
392
392
|
type: string;
|
|
393
393
|
collection: boolean;
|
|
394
394
|
writeable: boolean;
|
|
395
|
+
default: number;
|
|
395
396
|
};
|
|
396
397
|
MTU: {
|
|
397
398
|
type: string;
|
|
398
399
|
collection: boolean;
|
|
399
400
|
writeable: boolean;
|
|
401
|
+
default: number;
|
|
400
402
|
};
|
|
401
403
|
gateway: {
|
|
402
404
|
type: string;
|
|
@@ -407,6 +409,7 @@ export class NetworkInterface extends Base {
|
|
|
407
409
|
type: string;
|
|
408
410
|
collection: boolean;
|
|
409
411
|
writeable: boolean;
|
|
412
|
+
default: boolean;
|
|
410
413
|
};
|
|
411
414
|
};
|
|
412
415
|
};
|
|
@@ -49,6 +49,8 @@ export namespace networkProperties {
|
|
|
49
49
|
export { collection_5 as collection };
|
|
50
50
|
let writeable_5: boolean;
|
|
51
51
|
export { writeable_5 as writeable };
|
|
52
|
+
let _default: number;
|
|
53
|
+
export { _default as default };
|
|
52
54
|
}
|
|
53
55
|
export namespace MTU {
|
|
54
56
|
let type_6: string;
|
|
@@ -57,6 +59,8 @@ export namespace networkProperties {
|
|
|
57
59
|
export { collection_6 as collection };
|
|
58
60
|
let writeable_6: boolean;
|
|
59
61
|
export { writeable_6 as writeable };
|
|
62
|
+
let _default_1: number;
|
|
63
|
+
export { _default_1 as default };
|
|
60
64
|
}
|
|
61
65
|
export namespace gateway {
|
|
62
66
|
let type_7: string;
|
|
@@ -73,6 +77,8 @@ export namespace networkProperties {
|
|
|
73
77
|
export { collection_8 as collection };
|
|
74
78
|
let writeable_8: boolean;
|
|
75
79
|
export { writeable_8 as writeable };
|
|
80
|
+
let _default_2: boolean;
|
|
81
|
+
export { _default_2 as default };
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
export namespace networkAddressProperties {
|
package/types/network.d.mts
CHANGED
|
@@ -178,16 +178,19 @@ export class Network extends Owner {
|
|
|
178
178
|
type: string;
|
|
179
179
|
collection: boolean;
|
|
180
180
|
writeable: boolean;
|
|
181
|
+
default: number;
|
|
181
182
|
};
|
|
182
183
|
MTU: {
|
|
183
184
|
type: string;
|
|
184
185
|
collection: boolean;
|
|
185
186
|
writeable: boolean;
|
|
187
|
+
default: number;
|
|
186
188
|
};
|
|
187
189
|
multicastDNS: {
|
|
188
190
|
type: string;
|
|
189
191
|
collection: boolean;
|
|
190
192
|
writeable: boolean;
|
|
193
|
+
default: boolean;
|
|
191
194
|
};
|
|
192
195
|
};
|
|
193
196
|
};
|
package/types/service.d.mts
CHANGED
|
@@ -84,11 +84,13 @@ export namespace ServiceTypeDefinition {
|
|
|
84
84
|
type: string;
|
|
85
85
|
collection: boolean;
|
|
86
86
|
writeable: boolean;
|
|
87
|
+
default: number;
|
|
87
88
|
};
|
|
88
89
|
tls: {
|
|
89
90
|
type: string;
|
|
90
91
|
collection: boolean;
|
|
91
92
|
writeable: boolean;
|
|
93
|
+
default: boolean;
|
|
92
94
|
};
|
|
93
95
|
systemd: {
|
|
94
96
|
type: string;
|
|
@@ -207,11 +209,13 @@ export class Service extends Base {
|
|
|
207
209
|
type: string;
|
|
208
210
|
collection: boolean;
|
|
209
211
|
writeable: boolean;
|
|
212
|
+
default: number;
|
|
210
213
|
};
|
|
211
214
|
tls: {
|
|
212
215
|
type: string;
|
|
213
216
|
collection: boolean;
|
|
214
217
|
writeable: boolean;
|
|
218
|
+
default: boolean;
|
|
215
219
|
};
|
|
216
220
|
systemd: {
|
|
217
221
|
type: string;
|
|
@@ -85,11 +85,13 @@ export class DHCPService extends Service {
|
|
|
85
85
|
type: string;
|
|
86
86
|
collection: boolean;
|
|
87
87
|
writeable: boolean;
|
|
88
|
+
default: number;
|
|
88
89
|
};
|
|
89
90
|
tls: {
|
|
90
91
|
type: string;
|
|
91
92
|
collection: boolean;
|
|
92
93
|
writeable: boolean;
|
|
94
|
+
default: boolean;
|
|
93
95
|
};
|
|
94
96
|
systemd: {
|
|
95
97
|
type: string;
|
|
@@ -208,11 +210,13 @@ export class DHCPService extends Service {
|
|
|
208
210
|
type: string;
|
|
209
211
|
collection: boolean;
|
|
210
212
|
writeable: boolean;
|
|
213
|
+
default: number;
|
|
211
214
|
};
|
|
212
215
|
tls: {
|
|
213
216
|
type: string;
|
|
214
217
|
collection: boolean;
|
|
215
218
|
writeable: boolean;
|
|
219
|
+
default: boolean;
|
|
216
220
|
};
|
|
217
221
|
systemd: {
|
|
218
222
|
type: string;
|
package/types/services/dns.d.mts
CHANGED
|
@@ -85,11 +85,13 @@ export class DNSService extends ExtraSourceService {
|
|
|
85
85
|
type: string;
|
|
86
86
|
collection: boolean;
|
|
87
87
|
writeable: boolean;
|
|
88
|
+
default: number;
|
|
88
89
|
};
|
|
89
90
|
tls: {
|
|
90
91
|
type: string;
|
|
91
92
|
collection: boolean;
|
|
92
93
|
writeable: boolean;
|
|
94
|
+
default: boolean;
|
|
93
95
|
};
|
|
94
96
|
systemd: {
|
|
95
97
|
type: string;
|
|
@@ -211,11 +213,13 @@ export class DNSService extends ExtraSourceService {
|
|
|
211
213
|
type: string;
|
|
212
214
|
collection: boolean;
|
|
213
215
|
writeable: boolean;
|
|
216
|
+
default: number;
|
|
214
217
|
};
|
|
215
218
|
tls: {
|
|
216
219
|
type: string;
|
|
217
220
|
collection: boolean;
|
|
218
221
|
writeable: boolean;
|
|
222
|
+
default: boolean;
|
|
219
223
|
};
|
|
220
224
|
systemd: {
|
|
221
225
|
type: string;
|
|
@@ -279,16 +283,19 @@ export class DNSService extends ExtraSourceService {
|
|
|
279
283
|
type: string;
|
|
280
284
|
collection: boolean;
|
|
281
285
|
writeable: boolean;
|
|
286
|
+
default: boolean;
|
|
282
287
|
};
|
|
283
288
|
hasCatalog: {
|
|
284
289
|
type: string;
|
|
285
290
|
collection: boolean;
|
|
286
291
|
writeable: boolean;
|
|
292
|
+
default: boolean;
|
|
287
293
|
};
|
|
288
294
|
hasLinkLocalAdresses: {
|
|
289
295
|
type: string;
|
|
290
296
|
collection: boolean;
|
|
291
297
|
writeable: boolean;
|
|
298
|
+
default: boolean;
|
|
292
299
|
};
|
|
293
300
|
exclude: {
|
|
294
301
|
type: string;
|
|
@@ -299,6 +306,7 @@ export class DNSService extends ExtraSourceService {
|
|
|
299
306
|
type: string;
|
|
300
307
|
collection: boolean;
|
|
301
308
|
writeable: boolean;
|
|
309
|
+
default: boolean;
|
|
302
310
|
};
|
|
303
311
|
recordTTL: {
|
|
304
312
|
type: string;
|
package/types/services/ntp.d.mts
CHANGED
|
@@ -85,11 +85,13 @@ export class NTPService extends ExtraSourceService {
|
|
|
85
85
|
type: string;
|
|
86
86
|
collection: boolean;
|
|
87
87
|
writeable: boolean;
|
|
88
|
+
default: number;
|
|
88
89
|
};
|
|
89
90
|
tls: {
|
|
90
91
|
type: string;
|
|
91
92
|
collection: boolean;
|
|
92
93
|
writeable: boolean;
|
|
94
|
+
default: boolean;
|
|
93
95
|
};
|
|
94
96
|
systemd: {
|
|
95
97
|
type: string;
|
|
@@ -211,11 +213,13 @@ export class NTPService extends ExtraSourceService {
|
|
|
211
213
|
type: string;
|
|
212
214
|
collection: boolean;
|
|
213
215
|
writeable: boolean;
|
|
216
|
+
default: number;
|
|
214
217
|
};
|
|
215
218
|
tls: {
|
|
216
219
|
type: string;
|
|
217
220
|
collection: boolean;
|
|
218
221
|
writeable: boolean;
|
|
222
|
+
default: boolean;
|
|
219
223
|
};
|
|
220
224
|
systemd: {
|
|
221
225
|
type: string;
|