pmcf 1.85.0 → 1.87.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 +1 -1
- package/src/base.mjs +17 -1
- package/src/dns.mjs +14 -1
- package/types/base.d.mts +7 -0
- package/types/cluster.d.mts +15 -0
- package/types/dns.d.mts +7 -0
- package/types/host.d.mts +10 -0
- package/types/location.d.mts +20 -0
- package/types/network.d.mts +10 -0
- package/types/owner.d.mts +10 -0
- package/types/root.d.mts +20 -0
- package/types/service.d.mts +5 -0
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -23,7 +23,8 @@ const BaseTypeDefinition = {
|
|
|
23
23
|
},*/
|
|
24
24
|
description: { type: "string", collection: false, writeable: true },
|
|
25
25
|
directory: { type: "string", collection: false, writeable: false },
|
|
26
|
-
packaging: { type: "string", collection: false, writeable: true }
|
|
26
|
+
packaging: { type: "string", collection: false, writeable: true },
|
|
27
|
+
tags: { type: "string", collection: true, writeable: true }
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -31,6 +32,7 @@ export class Base {
|
|
|
31
32
|
owner;
|
|
32
33
|
description;
|
|
33
34
|
name;
|
|
35
|
+
#tags = new Set();
|
|
34
36
|
|
|
35
37
|
static {
|
|
36
38
|
addType(this);
|
|
@@ -368,6 +370,20 @@ export class Base {
|
|
|
368
370
|
};
|
|
369
371
|
}
|
|
370
372
|
|
|
373
|
+
get tags()
|
|
374
|
+
{
|
|
375
|
+
return this.#tags;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
set tags(value)
|
|
379
|
+
{
|
|
380
|
+
if (value instanceof Set) {
|
|
381
|
+
this.#tags = this.#tags.union(value);
|
|
382
|
+
} else {
|
|
383
|
+
this.#tags.add(value);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
371
387
|
expand(object) {
|
|
372
388
|
switch (typeof object) {
|
|
373
389
|
case "string":
|
package/src/dns.mjs
CHANGED
|
@@ -20,6 +20,7 @@ const DNSServiceTypeDefinition = {
|
|
|
20
20
|
properties: {
|
|
21
21
|
source: { type: "network", collection: true, writeable: true },
|
|
22
22
|
trusted: { type: "network", collection: true, writeable: true },
|
|
23
|
+
protected: { type: "network", collection: true, writeable: true },
|
|
23
24
|
hasSVRRecords: { type: "boolean", collection: false, writeable: true },
|
|
24
25
|
hasCatalog: { type: "boolean", collection: false, writeable: true },
|
|
25
26
|
hasLinkLocalAdresses: {
|
|
@@ -49,6 +50,7 @@ export class DNSService extends Base {
|
|
|
49
50
|
notify = true;
|
|
50
51
|
#source = [];
|
|
51
52
|
#trusted = [];
|
|
53
|
+
#protected = [];
|
|
52
54
|
|
|
53
55
|
serial = Math.ceil(Date.now() / 1000);
|
|
54
56
|
refresh = 36000;
|
|
@@ -78,6 +80,14 @@ export class DNSService extends Base {
|
|
|
78
80
|
return [this.serial, this.refresh, this.retry, this.expire, this.minimum];
|
|
79
81
|
}
|
|
80
82
|
|
|
83
|
+
set protected(value) {
|
|
84
|
+
this.#protected.push(value);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
get protected() {
|
|
88
|
+
return this.#protected;
|
|
89
|
+
}
|
|
90
|
+
|
|
81
91
|
set trusted(value) {
|
|
82
92
|
this.#trusted.push(value);
|
|
83
93
|
}
|
|
@@ -146,12 +156,15 @@ export class DNSService extends Base {
|
|
|
146
156
|
const category = [
|
|
147
157
|
"acl trusted {",
|
|
148
158
|
...Array.from(subnets(this.trusted)).map(subnet => ` ${subnet.name};`),
|
|
159
|
+
"};",
|
|
160
|
+
"acl protected {",
|
|
161
|
+
...Array.from(subnets(this.protected)).map(subnet => ` ${subnet.name};`),
|
|
149
162
|
"};"
|
|
150
163
|
];
|
|
151
164
|
|
|
152
165
|
await writeLines(
|
|
153
166
|
join(p1, "etc/named"),
|
|
154
|
-
|
|
167
|
+
`0-${name}.conf`,
|
|
155
168
|
category
|
|
156
169
|
);
|
|
157
170
|
|
package/types/base.d.mts
CHANGED
|
@@ -36,6 +36,11 @@ export class Base {
|
|
|
36
36
|
collection: boolean;
|
|
37
37
|
writeable: boolean;
|
|
38
38
|
};
|
|
39
|
+
tags: {
|
|
40
|
+
type: string;
|
|
41
|
+
collection: boolean;
|
|
42
|
+
writeable: boolean;
|
|
43
|
+
};
|
|
39
44
|
};
|
|
40
45
|
};
|
|
41
46
|
static get typeFileName(): string;
|
|
@@ -82,6 +87,8 @@ export class Base {
|
|
|
82
87
|
access: string;
|
|
83
88
|
};
|
|
84
89
|
}, void, unknown>;
|
|
90
|
+
set tags(value: Set<any>);
|
|
91
|
+
get tags(): Set<any>;
|
|
85
92
|
expand(object: any): any;
|
|
86
93
|
finalize(action: any): void;
|
|
87
94
|
execFinalize(): void;
|
package/types/cluster.d.mts
CHANGED
|
@@ -40,6 +40,11 @@ export class Cluster extends Host {
|
|
|
40
40
|
collection: boolean;
|
|
41
41
|
writeable: boolean;
|
|
42
42
|
};
|
|
43
|
+
tags: {
|
|
44
|
+
type: string;
|
|
45
|
+
collection: boolean;
|
|
46
|
+
writeable: boolean;
|
|
47
|
+
};
|
|
43
48
|
};
|
|
44
49
|
};
|
|
45
50
|
properties: {
|
|
@@ -102,6 +107,11 @@ export class Cluster extends Host {
|
|
|
102
107
|
collection: boolean;
|
|
103
108
|
writeable: boolean;
|
|
104
109
|
};
|
|
110
|
+
protected: {
|
|
111
|
+
type: string;
|
|
112
|
+
collection: boolean;
|
|
113
|
+
writeable: boolean;
|
|
114
|
+
};
|
|
105
115
|
hasSVRRecords: {
|
|
106
116
|
type: string;
|
|
107
117
|
collection: boolean;
|
|
@@ -255,6 +265,11 @@ export class Cluster extends Host {
|
|
|
255
265
|
collection: boolean;
|
|
256
266
|
writeable: boolean;
|
|
257
267
|
};
|
|
268
|
+
tags: {
|
|
269
|
+
type: string;
|
|
270
|
+
collection: boolean;
|
|
271
|
+
writeable: boolean;
|
|
272
|
+
};
|
|
258
273
|
};
|
|
259
274
|
};
|
|
260
275
|
properties: {
|
package/types/dns.d.mts
CHANGED
|
@@ -16,6 +16,11 @@ export class DNSService extends Base {
|
|
|
16
16
|
collection: boolean;
|
|
17
17
|
writeable: boolean;
|
|
18
18
|
};
|
|
19
|
+
protected: {
|
|
20
|
+
type: string;
|
|
21
|
+
collection: boolean;
|
|
22
|
+
writeable: boolean;
|
|
23
|
+
};
|
|
19
24
|
hasSVRRecords: {
|
|
20
25
|
type: string;
|
|
21
26
|
collection: boolean;
|
|
@@ -85,6 +90,8 @@ export class DNSService extends Base {
|
|
|
85
90
|
expire: number;
|
|
86
91
|
minimum: number;
|
|
87
92
|
get soaUpdates(): number[];
|
|
93
|
+
set protected(value: any[]);
|
|
94
|
+
get protected(): any[];
|
|
88
95
|
set trusted(value: any[]);
|
|
89
96
|
get trusted(): any[];
|
|
90
97
|
set source(value: any[]);
|
package/types/host.d.mts
CHANGED
|
@@ -38,6 +38,11 @@ export class Host extends Base {
|
|
|
38
38
|
collection: boolean;
|
|
39
39
|
writeable: boolean;
|
|
40
40
|
};
|
|
41
|
+
tags: {
|
|
42
|
+
type: string;
|
|
43
|
+
collection: boolean;
|
|
44
|
+
writeable: boolean;
|
|
45
|
+
};
|
|
41
46
|
};
|
|
42
47
|
};
|
|
43
48
|
properties: {
|
|
@@ -269,6 +274,11 @@ export class NetworkInterface extends Base {
|
|
|
269
274
|
collection: boolean;
|
|
270
275
|
writeable: boolean;
|
|
271
276
|
};
|
|
277
|
+
tags: {
|
|
278
|
+
type: string;
|
|
279
|
+
collection: boolean;
|
|
280
|
+
writeable: boolean;
|
|
281
|
+
};
|
|
272
282
|
};
|
|
273
283
|
};
|
|
274
284
|
properties: {
|
package/types/location.d.mts
CHANGED
|
@@ -40,6 +40,11 @@ export class Location extends Owner {
|
|
|
40
40
|
collection: boolean;
|
|
41
41
|
writeable: boolean;
|
|
42
42
|
};
|
|
43
|
+
tags: {
|
|
44
|
+
type: string;
|
|
45
|
+
collection: boolean;
|
|
46
|
+
writeable: boolean;
|
|
47
|
+
};
|
|
43
48
|
};
|
|
44
49
|
};
|
|
45
50
|
properties: {
|
|
@@ -102,6 +107,11 @@ export class Location extends Owner {
|
|
|
102
107
|
collection: boolean;
|
|
103
108
|
writeable: boolean;
|
|
104
109
|
};
|
|
110
|
+
protected: {
|
|
111
|
+
type: string;
|
|
112
|
+
collection: boolean;
|
|
113
|
+
writeable: boolean;
|
|
114
|
+
};
|
|
105
115
|
hasSVRRecords: {
|
|
106
116
|
type: string;
|
|
107
117
|
collection: boolean;
|
|
@@ -255,6 +265,11 @@ export class Location extends Owner {
|
|
|
255
265
|
collection: boolean;
|
|
256
266
|
writeable: boolean;
|
|
257
267
|
};
|
|
268
|
+
tags: {
|
|
269
|
+
type: string;
|
|
270
|
+
collection: boolean;
|
|
271
|
+
writeable: boolean;
|
|
272
|
+
};
|
|
258
273
|
};
|
|
259
274
|
};
|
|
260
275
|
properties: {
|
|
@@ -317,6 +332,11 @@ export class Location extends Owner {
|
|
|
317
332
|
collection: boolean;
|
|
318
333
|
writeable: boolean;
|
|
319
334
|
};
|
|
335
|
+
protected: {
|
|
336
|
+
type: string;
|
|
337
|
+
collection: boolean;
|
|
338
|
+
writeable: boolean;
|
|
339
|
+
};
|
|
320
340
|
hasSVRRecords: {
|
|
321
341
|
type: string;
|
|
322
342
|
collection: boolean;
|
package/types/network.d.mts
CHANGED
|
@@ -42,6 +42,11 @@ export class Network extends Owner {
|
|
|
42
42
|
collection: boolean;
|
|
43
43
|
writeable: boolean;
|
|
44
44
|
};
|
|
45
|
+
tags: {
|
|
46
|
+
type: string;
|
|
47
|
+
collection: boolean;
|
|
48
|
+
writeable: boolean;
|
|
49
|
+
};
|
|
45
50
|
};
|
|
46
51
|
};
|
|
47
52
|
properties: {
|
|
@@ -104,6 +109,11 @@ export class Network extends Owner {
|
|
|
104
109
|
collection: boolean;
|
|
105
110
|
writeable: boolean;
|
|
106
111
|
};
|
|
112
|
+
protected: {
|
|
113
|
+
type: string;
|
|
114
|
+
collection: boolean;
|
|
115
|
+
writeable: boolean;
|
|
116
|
+
};
|
|
107
117
|
hasSVRRecords: {
|
|
108
118
|
type: string;
|
|
109
119
|
collection: boolean;
|
package/types/owner.d.mts
CHANGED
|
@@ -38,6 +38,11 @@ export class Owner extends Base {
|
|
|
38
38
|
collection: boolean;
|
|
39
39
|
writeable: boolean;
|
|
40
40
|
};
|
|
41
|
+
tags: {
|
|
42
|
+
type: string;
|
|
43
|
+
collection: boolean;
|
|
44
|
+
writeable: boolean;
|
|
45
|
+
};
|
|
41
46
|
};
|
|
42
47
|
};
|
|
43
48
|
properties: {
|
|
@@ -100,6 +105,11 @@ export class Owner extends Base {
|
|
|
100
105
|
collection: boolean;
|
|
101
106
|
writeable: boolean;
|
|
102
107
|
};
|
|
108
|
+
protected: {
|
|
109
|
+
type: string;
|
|
110
|
+
collection: boolean;
|
|
111
|
+
writeable: boolean;
|
|
112
|
+
};
|
|
103
113
|
hasSVRRecords: {
|
|
104
114
|
type: string;
|
|
105
115
|
collection: boolean;
|
package/types/root.d.mts
CHANGED
|
@@ -44,6 +44,11 @@ export class Root extends Location {
|
|
|
44
44
|
collection: boolean;
|
|
45
45
|
writeable: boolean;
|
|
46
46
|
};
|
|
47
|
+
tags: {
|
|
48
|
+
type: string;
|
|
49
|
+
collection: boolean;
|
|
50
|
+
writeable: boolean;
|
|
51
|
+
};
|
|
47
52
|
};
|
|
48
53
|
};
|
|
49
54
|
properties: {
|
|
@@ -106,6 +111,11 @@ export class Root extends Location {
|
|
|
106
111
|
collection: boolean;
|
|
107
112
|
writeable: boolean;
|
|
108
113
|
};
|
|
114
|
+
protected: {
|
|
115
|
+
type: string;
|
|
116
|
+
collection: boolean;
|
|
117
|
+
writeable: boolean;
|
|
118
|
+
};
|
|
109
119
|
hasSVRRecords: {
|
|
110
120
|
type: string;
|
|
111
121
|
collection: boolean;
|
|
@@ -259,6 +269,11 @@ export class Root extends Location {
|
|
|
259
269
|
collection: boolean;
|
|
260
270
|
writeable: boolean;
|
|
261
271
|
};
|
|
272
|
+
tags: {
|
|
273
|
+
type: string;
|
|
274
|
+
collection: boolean;
|
|
275
|
+
writeable: boolean;
|
|
276
|
+
};
|
|
262
277
|
};
|
|
263
278
|
};
|
|
264
279
|
properties: {
|
|
@@ -321,6 +336,11 @@ export class Root extends Location {
|
|
|
321
336
|
collection: boolean;
|
|
322
337
|
writeable: boolean;
|
|
323
338
|
};
|
|
339
|
+
protected: {
|
|
340
|
+
type: string;
|
|
341
|
+
collection: boolean;
|
|
342
|
+
writeable: boolean;
|
|
343
|
+
};
|
|
324
344
|
hasSVRRecords: {
|
|
325
345
|
type: string;
|
|
326
346
|
collection: boolean;
|