pmcf 3.16.5 → 3.17.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
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { asArray, writeLines, sectionLines } from "../utils.mjs";
|
|
15
15
|
import { SkeletonNetworkInterface } from "./skeleton.mjs";
|
|
16
16
|
import { Network } from "../network.mjs";
|
|
17
|
+
import { yesno } from "../utils.mjs";
|
|
17
18
|
|
|
18
19
|
export const NetworkInterfaceTypeDefinition = {
|
|
19
20
|
name: "network_interface",
|
|
@@ -243,7 +244,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
243
244
|
...networkSectionExtra,
|
|
244
245
|
DHCP: "no",
|
|
245
246
|
DHCPServer: "no",
|
|
246
|
-
MulticastDNS: this.network.multicastDNS
|
|
247
|
+
MulticastDNS: yesno(this.network.multicastDNS),
|
|
247
248
|
LinkLocalAddressing: "ipv6",
|
|
248
249
|
IPv6LinkLocalAddressGenerationMode: "stable-privacy"
|
|
249
250
|
}),
|
package/src/services/bind.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import { FileContentProvider } from "npm-pkgbuild";
|
|
|
4
4
|
import { isLinkLocal, reverseArpa } from "ip-utilties";
|
|
5
5
|
import {
|
|
6
6
|
addType,
|
|
7
|
-
oneOfType,
|
|
8
7
|
default_attribute_writable,
|
|
9
8
|
string_attribute_writable,
|
|
10
9
|
boolean_attribute_writable_true,
|
|
@@ -13,7 +12,7 @@ import {
|
|
|
13
12
|
string_collection_attribute_writable,
|
|
14
13
|
name_attribute_writable
|
|
15
14
|
} from "pacc";
|
|
16
|
-
import { writeLines, asArray } from "../utils.mjs";
|
|
15
|
+
import { yesno, writeLines, asArray } from "../utils.mjs";
|
|
17
16
|
import {
|
|
18
17
|
DNSRecord,
|
|
19
18
|
dnsFullName,
|
|
@@ -619,7 +618,7 @@ export class BindService extends ExtraSourceService {
|
|
|
619
618
|
: "none"
|
|
620
619
|
}; };`
|
|
621
620
|
);
|
|
622
|
-
content.push(` notify ${this.notify
|
|
621
|
+
content.push(` notify ${yesno(this.notify)};`);
|
|
623
622
|
}
|
|
624
623
|
content.push(`};`, "");
|
|
625
624
|
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { addType } from "pacc";
|
|
1
|
+
import { addType, boolean_attribute_writable } from "pacc";
|
|
2
2
|
import {
|
|
3
3
|
ExtraSourceService,
|
|
4
4
|
ExtraSourceServiceTypeDefinition,
|
|
5
5
|
ServiceTypeDefinition,
|
|
6
6
|
serviceEndpoints,
|
|
7
7
|
} from "pmcf";
|
|
8
|
+
import { yesno } from "../utils.mjs";
|
|
8
9
|
|
|
9
10
|
const SystemdResolvedServiceTypeDefinition = {
|
|
10
11
|
name: "systemd-resolved",
|
|
11
12
|
extends: ExtraSourceServiceTypeDefinition,
|
|
12
13
|
specializationOf: ServiceTypeDefinition,
|
|
13
14
|
owners: ServiceTypeDefinition.owners,
|
|
14
|
-
key: "name"
|
|
15
|
+
key: "name",
|
|
16
|
+
attributes: {
|
|
17
|
+
llmnr: boolean_attribute_writable
|
|
18
|
+
}
|
|
15
19
|
};
|
|
16
20
|
|
|
17
21
|
export class SystemdResolvedService extends ExtraSourceService {
|
|
@@ -28,7 +32,7 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
get systemdServices() {
|
|
31
|
-
return
|
|
35
|
+
return this.type;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
38
|
systemdConfigs(name) {
|
|
@@ -55,8 +59,8 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
55
59
|
FallbackDNS: serviceEndpoints(this, options(100, 199, 4)),
|
|
56
60
|
Domains: [...this.localDomains].join(" "),
|
|
57
61
|
DNSSEC: "no",
|
|
58
|
-
MulticastDNS: this.network.multicastDNS
|
|
59
|
-
LLMNR:
|
|
62
|
+
MulticastDNS: yesno(this.network.multicastDNS),
|
|
63
|
+
LLMNR: yesno(this.llmnr)
|
|
60
64
|
}
|
|
61
65
|
]
|
|
62
66
|
};
|
package/src/utils.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { writeFile, mkdir } from "node:fs/promises";
|
|
2
2
|
import { join, dirname, basename } from "node:path";
|
|
3
3
|
|
|
4
|
+
export function yesno(flag) {
|
|
5
|
+
return flag ? "yes" : "no";
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
export function domainName(name, defaultDomain) {
|
|
5
9
|
const dcs = name.split(".");
|
|
6
10
|
return defaultDomain === undefined || dcs.length > 1
|
|
@@ -1084,6 +1084,9 @@ export class SystemdResolvedService extends ExtraSourceService {
|
|
|
1084
1084
|
};
|
|
1085
1085
|
})[];
|
|
1086
1086
|
key: string;
|
|
1087
|
+
attributes: {
|
|
1088
|
+
llmnr: import("pacc").AttributeDefinition;
|
|
1089
|
+
};
|
|
1087
1090
|
};
|
|
1088
1091
|
get systemdServices(): string;
|
|
1089
1092
|
systemdConfigs(name: any): {
|
package/types/utils.d.mts
CHANGED