pmcf 1.102.6 → 1.103.1
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/base.mjs +14 -2
- package/src/host.mjs +0 -2
- package/src/location.mjs +2 -2
- package/src/service.mjs +0 -17
- package/src/services/dns.mjs +8 -1
- package/src/services/ntp.mjs +1 -1
- package/types/base.d.mts +8 -0
- package/types/cluster.d.mts +10 -5
- package/types/host.d.mts +10 -6
- package/types/location.d.mts +10 -0
- package/types/network.d.mts +5 -0
- package/types/owner.d.mts +5 -0
- package/types/root.d.mts +10 -0
- package/types/service.d.mts +10 -13
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -22,6 +22,7 @@ const BaseTypeDefinition = {
|
|
|
22
22
|
writeable: false
|
|
23
23
|
},*/
|
|
24
24
|
description: { type: "string", collection: false, writeable: true },
|
|
25
|
+
priority: { type: "number", collection: false, writeable: true },
|
|
25
26
|
directory: { type: "string", collection: false, writeable: false },
|
|
26
27
|
packaging: { type: "string", collection: false, writeable: true },
|
|
27
28
|
tags: { type: "string", collection: true, writeable: true }
|
|
@@ -311,6 +312,19 @@ export class Base {
|
|
|
311
312
|
return this.owner?.timezone;
|
|
312
313
|
}
|
|
313
314
|
|
|
315
|
+
set priority(value) {
|
|
316
|
+
this._priority = value;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
get priority() {
|
|
320
|
+
if (this._priority !== undefined) {
|
|
321
|
+
return this._priority;
|
|
322
|
+
}
|
|
323
|
+
if (this.owner?.priority !== undefined) {
|
|
324
|
+
return this.owner.priority;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
314
328
|
get smtp() {
|
|
315
329
|
return this.findService({ type: "smtp" });
|
|
316
330
|
}
|
|
@@ -346,7 +360,6 @@ export class Base {
|
|
|
346
360
|
: this.owner.fullName;
|
|
347
361
|
}
|
|
348
362
|
|
|
349
|
-
|
|
350
363
|
set packaging(value) {
|
|
351
364
|
this._packaging.add(value);
|
|
352
365
|
}
|
|
@@ -424,7 +437,6 @@ export class Base {
|
|
|
424
437
|
return object;
|
|
425
438
|
}
|
|
426
439
|
|
|
427
|
-
|
|
428
440
|
finalize(action) {
|
|
429
441
|
if (!this._finalize) {
|
|
430
442
|
this._finalize = [];
|
package/src/host.mjs
CHANGED
|
@@ -45,7 +45,6 @@ const HostTypeDefinition = {
|
|
|
45
45
|
distribution: { type: "string", collection: false, writeable: true },
|
|
46
46
|
deployment: { type: "string", collection: false, writeable: true },
|
|
47
47
|
master: { type: "boolean", collection: false, writeable: true },
|
|
48
|
-
priority: { type: "number", collection: false, writeable: true },
|
|
49
48
|
weight: { type: "number", collection: false, writeable: true },
|
|
50
49
|
serial: { type: "string", collection: false, writeable: true },
|
|
51
50
|
vendor: { type: "string", collection: false, writeable: true },
|
|
@@ -61,7 +60,6 @@ const HostTypeDefinition = {
|
|
|
61
60
|
};
|
|
62
61
|
|
|
63
62
|
export class Host extends Base {
|
|
64
|
-
priority = 1;
|
|
65
63
|
_services = [];
|
|
66
64
|
_extends = [];
|
|
67
65
|
_aliases = new Set();
|
package/src/location.mjs
CHANGED
|
@@ -68,7 +68,7 @@ export class Location extends Owner {
|
|
|
68
68
|
await writeLines(
|
|
69
69
|
join(dir, "etc/systemd/resolved.conf.d"),
|
|
70
70
|
`${this.name}.conf`,
|
|
71
|
-
sectionLines(...this.findService({type: "dns"}).systemdConfig)
|
|
71
|
+
sectionLines(...this.findService({ type: "dns" }).systemdConfig)
|
|
72
72
|
);
|
|
73
73
|
|
|
74
74
|
await writeLines(
|
|
@@ -84,7 +84,7 @@ export class Location extends Owner {
|
|
|
84
84
|
await writeLines(
|
|
85
85
|
join(dir, "etc/systemd/timesyncd.conf.d"),
|
|
86
86
|
`${this.name}.conf`,
|
|
87
|
-
sectionLines(...this.findService({type: "ntp"}).systemdConfig)
|
|
87
|
+
sectionLines(...this.findService({ type: "ntp" }).systemdConfig)
|
|
88
88
|
);
|
|
89
89
|
|
|
90
90
|
const locationDir = join(dir, "etc", "location");
|
package/src/service.mjs
CHANGED
|
@@ -86,7 +86,6 @@ export const ServiceTypeDefinition = {
|
|
|
86
86
|
alias: { type: "string", collection: false, writeable: true },
|
|
87
87
|
type: { type: "string", collection: false, writeable: true },
|
|
88
88
|
master: { type: "boolean", collection: false, writeable: true },
|
|
89
|
-
priority: { type: "number", collection: false, writeable: true },
|
|
90
89
|
weight: { type: "number", collection: false, writeable: true },
|
|
91
90
|
srvPrefix: { type: "string", collection: false, writeable: false },
|
|
92
91
|
tls: { type: "string", collection: false, writeable: false },
|
|
@@ -97,7 +96,6 @@ export const ServiceTypeDefinition = {
|
|
|
97
96
|
export class Service extends Base {
|
|
98
97
|
alias;
|
|
99
98
|
_weight;
|
|
100
|
-
_priority;
|
|
101
99
|
_type;
|
|
102
100
|
_port;
|
|
103
101
|
_ipAddresses;
|
|
@@ -156,21 +154,6 @@ export class Service extends Base {
|
|
|
156
154
|
return this._port || ServiceTypes[this.type]?.port;
|
|
157
155
|
}
|
|
158
156
|
|
|
159
|
-
set priority(value) {
|
|
160
|
-
this._priority = value;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
get priority() {
|
|
164
|
-
if (this._priority !== undefined) {
|
|
165
|
-
return this._priority;
|
|
166
|
-
}
|
|
167
|
-
if (this.owner.priority !== undefined) {
|
|
168
|
-
return this.owner.priority;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
return 99;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
157
|
set weight(value) {
|
|
175
158
|
this._weight = value;
|
|
176
159
|
}
|
package/src/services/dns.mjs
CHANGED
|
@@ -143,7 +143,7 @@ export class DNSService extends Service {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
*findServices(filter) {
|
|
146
|
-
yield* this.owner.findServices(filter);
|
|
146
|
+
yield* this.owner.owner.findServices(filter);
|
|
147
147
|
|
|
148
148
|
for (const s of this.source) {
|
|
149
149
|
yield* s.findServices(filter);
|
|
@@ -151,6 +151,13 @@ export class DNSService extends Service {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
get systemdConfig() {
|
|
154
|
+
/* console.log([
|
|
155
|
+
...this.findServices({
|
|
156
|
+
...DNS_SERVICE_FILTER,
|
|
157
|
+
priority: "<10"
|
|
158
|
+
})
|
|
159
|
+
].map((s)=>`${s.owner.name}[${s.priority}]`));
|
|
160
|
+
*/
|
|
154
161
|
return [
|
|
155
162
|
"Resolve",
|
|
156
163
|
{
|
package/src/services/ntp.mjs
CHANGED
package/types/base.d.mts
CHANGED
|
@@ -26,6 +26,11 @@ export class Base {
|
|
|
26
26
|
collection: boolean;
|
|
27
27
|
writeable: boolean;
|
|
28
28
|
};
|
|
29
|
+
priority: {
|
|
30
|
+
type: string;
|
|
31
|
+
collection: boolean;
|
|
32
|
+
writeable: boolean;
|
|
33
|
+
};
|
|
29
34
|
directory: {
|
|
30
35
|
type: string;
|
|
31
36
|
collection: boolean;
|
|
@@ -73,6 +78,9 @@ export class Base {
|
|
|
73
78
|
get locales(): any;
|
|
74
79
|
get country(): any;
|
|
75
80
|
get timezone(): any;
|
|
81
|
+
set priority(value: any);
|
|
82
|
+
get priority(): any;
|
|
83
|
+
_priority: any;
|
|
76
84
|
get smtp(): any;
|
|
77
85
|
findService(filter: any): any;
|
|
78
86
|
findServices(filter: any): Generator<any, void, any>;
|
package/types/cluster.d.mts
CHANGED
|
@@ -30,6 +30,11 @@ export class Cluster extends Host {
|
|
|
30
30
|
collection: boolean;
|
|
31
31
|
writeable: boolean;
|
|
32
32
|
};
|
|
33
|
+
priority: {
|
|
34
|
+
type: string;
|
|
35
|
+
collection: boolean;
|
|
36
|
+
writeable: boolean;
|
|
37
|
+
};
|
|
33
38
|
directory: {
|
|
34
39
|
type: string;
|
|
35
40
|
collection: boolean;
|
|
@@ -158,6 +163,11 @@ export class Cluster extends Host {
|
|
|
158
163
|
collection: boolean;
|
|
159
164
|
writeable: boolean;
|
|
160
165
|
};
|
|
166
|
+
priority: {
|
|
167
|
+
type: string;
|
|
168
|
+
collection: boolean;
|
|
169
|
+
writeable: boolean;
|
|
170
|
+
};
|
|
161
171
|
directory: {
|
|
162
172
|
type: string;
|
|
163
173
|
collection: boolean;
|
|
@@ -216,11 +226,6 @@ export class Cluster extends Host {
|
|
|
216
226
|
collection: boolean;
|
|
217
227
|
writeable: boolean;
|
|
218
228
|
};
|
|
219
|
-
priority: {
|
|
220
|
-
type: string;
|
|
221
|
-
collection: boolean;
|
|
222
|
-
writeable: boolean;
|
|
223
|
-
};
|
|
224
229
|
weight: {
|
|
225
230
|
type: string;
|
|
226
231
|
collection: boolean;
|
package/types/host.d.mts
CHANGED
|
@@ -28,6 +28,11 @@ export class Host extends Base {
|
|
|
28
28
|
collection: boolean;
|
|
29
29
|
writeable: boolean;
|
|
30
30
|
};
|
|
31
|
+
priority: {
|
|
32
|
+
type: string;
|
|
33
|
+
collection: boolean;
|
|
34
|
+
writeable: boolean;
|
|
35
|
+
};
|
|
31
36
|
directory: {
|
|
32
37
|
type: string;
|
|
33
38
|
collection: boolean;
|
|
@@ -86,11 +91,6 @@ export class Host extends Base {
|
|
|
86
91
|
collection: boolean;
|
|
87
92
|
writeable: boolean;
|
|
88
93
|
};
|
|
89
|
-
priority: {
|
|
90
|
-
type: string;
|
|
91
|
-
collection: boolean;
|
|
92
|
-
writeable: boolean;
|
|
93
|
-
};
|
|
94
94
|
weight: {
|
|
95
95
|
type: string;
|
|
96
96
|
collection: boolean;
|
|
@@ -173,7 +173,6 @@ export class Host extends Base {
|
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
175
|
};
|
|
176
|
-
priority: number;
|
|
177
176
|
_services: any[];
|
|
178
177
|
_extends: any[];
|
|
179
178
|
_aliases: Set<any>;
|
|
@@ -292,6 +291,11 @@ export class NetworkInterface extends Base {
|
|
|
292
291
|
collection: boolean;
|
|
293
292
|
writeable: boolean;
|
|
294
293
|
};
|
|
294
|
+
priority: {
|
|
295
|
+
type: string;
|
|
296
|
+
collection: boolean;
|
|
297
|
+
writeable: boolean;
|
|
298
|
+
};
|
|
295
299
|
directory: {
|
|
296
300
|
type: string;
|
|
297
301
|
collection: boolean;
|
package/types/location.d.mts
CHANGED
|
@@ -30,6 +30,11 @@ export class Location extends Owner {
|
|
|
30
30
|
collection: boolean;
|
|
31
31
|
writeable: boolean;
|
|
32
32
|
};
|
|
33
|
+
priority: {
|
|
34
|
+
type: string;
|
|
35
|
+
collection: boolean;
|
|
36
|
+
writeable: boolean;
|
|
37
|
+
};
|
|
33
38
|
directory: {
|
|
34
39
|
type: string;
|
|
35
40
|
collection: boolean;
|
|
@@ -158,6 +163,11 @@ export class Location extends Owner {
|
|
|
158
163
|
collection: boolean;
|
|
159
164
|
writeable: boolean;
|
|
160
165
|
};
|
|
166
|
+
priority: {
|
|
167
|
+
type: string;
|
|
168
|
+
collection: boolean;
|
|
169
|
+
writeable: boolean;
|
|
170
|
+
};
|
|
161
171
|
directory: {
|
|
162
172
|
type: string;
|
|
163
173
|
collection: boolean;
|
package/types/network.d.mts
CHANGED
package/types/owner.d.mts
CHANGED
package/types/root.d.mts
CHANGED
|
@@ -34,6 +34,11 @@ export class Root extends Location {
|
|
|
34
34
|
collection: boolean;
|
|
35
35
|
writeable: boolean;
|
|
36
36
|
};
|
|
37
|
+
priority: {
|
|
38
|
+
type: string;
|
|
39
|
+
collection: boolean;
|
|
40
|
+
writeable: boolean;
|
|
41
|
+
};
|
|
37
42
|
directory: {
|
|
38
43
|
type: string;
|
|
39
44
|
collection: boolean;
|
|
@@ -162,6 +167,11 @@ export class Root extends Location {
|
|
|
162
167
|
collection: boolean;
|
|
163
168
|
writeable: boolean;
|
|
164
169
|
};
|
|
170
|
+
priority: {
|
|
171
|
+
type: string;
|
|
172
|
+
collection: boolean;
|
|
173
|
+
writeable: boolean;
|
|
174
|
+
};
|
|
165
175
|
directory: {
|
|
166
176
|
type: string;
|
|
167
177
|
collection: boolean;
|
package/types/service.d.mts
CHANGED
|
@@ -28,6 +28,11 @@ export namespace ServiceTypeDefinition {
|
|
|
28
28
|
collection: boolean;
|
|
29
29
|
writeable: boolean;
|
|
30
30
|
};
|
|
31
|
+
priority: {
|
|
32
|
+
type: string;
|
|
33
|
+
collection: boolean;
|
|
34
|
+
writeable: boolean;
|
|
35
|
+
};
|
|
31
36
|
directory: {
|
|
32
37
|
type: string;
|
|
33
38
|
collection: boolean;
|
|
@@ -78,11 +83,6 @@ export namespace ServiceTypeDefinition {
|
|
|
78
83
|
collection: boolean;
|
|
79
84
|
writeable: boolean;
|
|
80
85
|
};
|
|
81
|
-
priority: {
|
|
82
|
-
type: string;
|
|
83
|
-
collection: boolean;
|
|
84
|
-
writeable: boolean;
|
|
85
|
-
};
|
|
86
86
|
weight: {
|
|
87
87
|
type: string;
|
|
88
88
|
collection: boolean;
|
|
@@ -160,6 +160,11 @@ export class Service extends Base {
|
|
|
160
160
|
collection: boolean;
|
|
161
161
|
writeable: boolean;
|
|
162
162
|
};
|
|
163
|
+
priority: {
|
|
164
|
+
type: string;
|
|
165
|
+
collection: boolean;
|
|
166
|
+
writeable: boolean;
|
|
167
|
+
};
|
|
163
168
|
directory: {
|
|
164
169
|
type: string;
|
|
165
170
|
collection: boolean;
|
|
@@ -209,11 +214,6 @@ export class Service extends Base {
|
|
|
209
214
|
collection: boolean;
|
|
210
215
|
writeable: boolean;
|
|
211
216
|
};
|
|
212
|
-
priority: {
|
|
213
|
-
type: string;
|
|
214
|
-
collection: boolean;
|
|
215
|
-
writeable: boolean;
|
|
216
|
-
};
|
|
217
217
|
weight: {
|
|
218
218
|
type: string;
|
|
219
219
|
collection: boolean;
|
|
@@ -263,7 +263,6 @@ export class Service extends Base {
|
|
|
263
263
|
};
|
|
264
264
|
alias: any;
|
|
265
265
|
_weight: any;
|
|
266
|
-
_priority: any;
|
|
267
266
|
_type: any;
|
|
268
267
|
_port: any;
|
|
269
268
|
_ipAddresses: any;
|
|
@@ -277,8 +276,6 @@ export class Service extends Base {
|
|
|
277
276
|
get addresses(): any;
|
|
278
277
|
set port(value: any);
|
|
279
278
|
get port(): any;
|
|
280
|
-
set priority(value: any);
|
|
281
|
-
get priority(): any;
|
|
282
279
|
set weight(value: any);
|
|
283
280
|
get weight(): any;
|
|
284
281
|
set type(value: any);
|