pmcf 1.31.2 → 1.31.3
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/bin/pmcf-named-defs +25 -19
- package/package.json +1 -1
- package/src/dns.mjs +1 -0
- package/types/dns.d.mts +1 -0
package/bin/pmcf-named-defs
CHANGED
|
@@ -91,6 +91,8 @@ async function generateNamedDefs(owner, targetDir) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
const hosts = new Set();
|
|
95
|
+
|
|
94
96
|
for await (const {
|
|
95
97
|
address,
|
|
96
98
|
networkInterface
|
|
@@ -104,25 +106,29 @@ async function generateNamedDefs(owner, targetDir) {
|
|
|
104
106
|
)
|
|
105
107
|
);
|
|
106
108
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
service.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
109
|
+
if (!hosts.has(host)) {
|
|
110
|
+
hosts.add(host);
|
|
111
|
+
for (const service of host.services()) {
|
|
112
|
+
//console.log(service.name);
|
|
113
|
+
if (service.master && service.alias) {
|
|
114
|
+
zone.records.add(
|
|
115
|
+
createRecord(service.alias, "CNAME", `${host.domainName}.`)
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (dns.srvRecords && service.srvPrefix) {
|
|
120
|
+
zone.records.add(
|
|
121
|
+
createRecord(
|
|
122
|
+
`${service.srvPrefix}.${host.domainName}.`,
|
|
123
|
+
"SRV",
|
|
124
|
+
`${String(service.priority).padStart(4)} ${String(
|
|
125
|
+
service.weight
|
|
126
|
+
).padStart(3)} ${String(service.port).padStart(5)} ${
|
|
127
|
+
host.domainName
|
|
128
|
+
}.`
|
|
129
|
+
)
|
|
130
|
+
);
|
|
131
|
+
}
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
|
package/package.json
CHANGED
package/src/dns.mjs
CHANGED