pmcf 1.65.3 → 1.66.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/dns.mjs +5 -3
- package/types/cluster.d.mts +10 -0
- package/types/dns.d.mts +6 -0
- 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/package.json
CHANGED
package/src/dns.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { createHmac } from "node:crypto";
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
|
-
import { writeLines, isIPv6Address, normalizeIPAddress } from "./utils.mjs";
|
|
4
|
+
import { writeLines, isIPv6Address, normalizeIPAddress, isLinkLocal } from "./utils.mjs";
|
|
5
5
|
import { Base } from "./base.mjs";
|
|
6
6
|
import { addType } from "./types.mjs";
|
|
7
7
|
|
|
@@ -12,6 +12,7 @@ const DNSServiceTypeDefinition = {
|
|
|
12
12
|
properties: {
|
|
13
13
|
hasSVRRecords: { type: "boolean", collection: false, writeable: true },
|
|
14
14
|
hasCatalog: { type: "boolean", collection: false, writeable: true },
|
|
15
|
+
hasLinkLocalAdresses: { type: "boolean", collection: false, writeable: true },
|
|
15
16
|
notify: { type: "boolean", collection: false, writeable: true },
|
|
16
17
|
recordTTL: { type: "string", collection: false, writeable: true },
|
|
17
18
|
refresh: { type: "string", collection: false, writeable: true },
|
|
@@ -30,6 +31,7 @@ export class DNSService extends Base {
|
|
|
30
31
|
recordTTL = "1W";
|
|
31
32
|
hasSVRRecords = true;
|
|
32
33
|
hasCatalog = true;
|
|
34
|
+
hasLinkLocalAdresses = true;
|
|
33
35
|
notify = true;
|
|
34
36
|
#forwardsTo = [];
|
|
35
37
|
|
|
@@ -210,7 +212,7 @@ async function generateNamedDefs(dns, targetDir) {
|
|
|
210
212
|
} of dns.owner.networkAddresses()) {
|
|
211
213
|
const host = networkInterface.host;
|
|
212
214
|
|
|
213
|
-
if (!addresses.has(address)) {
|
|
215
|
+
if (!addresses.has(address) && (dns.hasLinkLocalAdresses || !isLinkLocal(address))) {
|
|
214
216
|
addresses.add(address);
|
|
215
217
|
|
|
216
218
|
zone.records.add(
|
|
@@ -276,7 +278,7 @@ async function generateNamedDefs(dns, targetDir) {
|
|
|
276
278
|
if (zone.type !== "catalog") {
|
|
277
279
|
const hash = createHmac("md5", zone.id).digest("hex");
|
|
278
280
|
catalogZone.records.add(
|
|
279
|
-
createRecord(`${hash}.zones.${domain}.`, "PTR", fullName(zone.id))
|
|
281
|
+
createRecord(`${hash}.zones.catalog.${domain}.`, "PTR", fullName(zone.id))
|
|
280
282
|
);
|
|
281
283
|
}
|
|
282
284
|
|
package/types/cluster.d.mts
CHANGED
|
@@ -102,6 +102,11 @@ export class Cluster extends Host {
|
|
|
102
102
|
collection: boolean;
|
|
103
103
|
writeable: boolean;
|
|
104
104
|
};
|
|
105
|
+
hasLinkLocalAdresses: {
|
|
106
|
+
type: string;
|
|
107
|
+
collection: boolean;
|
|
108
|
+
writeable: boolean;
|
|
109
|
+
};
|
|
105
110
|
notify: {
|
|
106
111
|
type: string;
|
|
107
112
|
collection: boolean;
|
|
@@ -281,6 +286,11 @@ export class Cluster extends Host {
|
|
|
281
286
|
collection: boolean;
|
|
282
287
|
writeable: boolean;
|
|
283
288
|
};
|
|
289
|
+
hasLinkLocalAdresses: {
|
|
290
|
+
type: string;
|
|
291
|
+
collection: boolean;
|
|
292
|
+
writeable: boolean;
|
|
293
|
+
};
|
|
284
294
|
notify: {
|
|
285
295
|
type: string;
|
|
286
296
|
collection: boolean;
|
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
|
+
hasLinkLocalAdresses: {
|
|
20
|
+
type: string;
|
|
21
|
+
collection: boolean;
|
|
22
|
+
writeable: boolean;
|
|
23
|
+
};
|
|
19
24
|
notify: {
|
|
20
25
|
type: string;
|
|
21
26
|
collection: boolean;
|
|
@@ -62,6 +67,7 @@ export class DNSService extends Base {
|
|
|
62
67
|
recordTTL: string;
|
|
63
68
|
hasSVRRecords: boolean;
|
|
64
69
|
hasCatalog: boolean;
|
|
70
|
+
hasLinkLocalAdresses: boolean;
|
|
65
71
|
notify: boolean;
|
|
66
72
|
refresh: number;
|
|
67
73
|
retry: number;
|
package/types/location.d.mts
CHANGED
|
@@ -102,6 +102,11 @@ export class Location extends Owner {
|
|
|
102
102
|
collection: boolean;
|
|
103
103
|
writeable: boolean;
|
|
104
104
|
};
|
|
105
|
+
hasLinkLocalAdresses: {
|
|
106
|
+
type: string;
|
|
107
|
+
collection: boolean;
|
|
108
|
+
writeable: boolean;
|
|
109
|
+
};
|
|
105
110
|
notify: {
|
|
106
111
|
type: string;
|
|
107
112
|
collection: boolean;
|
|
@@ -281,6 +286,11 @@ export class Location extends Owner {
|
|
|
281
286
|
collection: boolean;
|
|
282
287
|
writeable: boolean;
|
|
283
288
|
};
|
|
289
|
+
hasLinkLocalAdresses: {
|
|
290
|
+
type: string;
|
|
291
|
+
collection: boolean;
|
|
292
|
+
writeable: boolean;
|
|
293
|
+
};
|
|
284
294
|
notify: {
|
|
285
295
|
type: string;
|
|
286
296
|
collection: boolean;
|
package/types/network.d.mts
CHANGED
|
@@ -104,6 +104,11 @@ export class Network extends Owner {
|
|
|
104
104
|
collection: boolean;
|
|
105
105
|
writeable: boolean;
|
|
106
106
|
};
|
|
107
|
+
hasLinkLocalAdresses: {
|
|
108
|
+
type: string;
|
|
109
|
+
collection: boolean;
|
|
110
|
+
writeable: boolean;
|
|
111
|
+
};
|
|
107
112
|
notify: {
|
|
108
113
|
type: string;
|
|
109
114
|
collection: boolean;
|
package/types/owner.d.mts
CHANGED
|
@@ -100,6 +100,11 @@ export class Owner extends Base {
|
|
|
100
100
|
collection: boolean;
|
|
101
101
|
writeable: boolean;
|
|
102
102
|
};
|
|
103
|
+
hasLinkLocalAdresses: {
|
|
104
|
+
type: string;
|
|
105
|
+
collection: boolean;
|
|
106
|
+
writeable: boolean;
|
|
107
|
+
};
|
|
103
108
|
notify: {
|
|
104
109
|
type: string;
|
|
105
110
|
collection: boolean;
|
package/types/root.d.mts
CHANGED
|
@@ -106,6 +106,11 @@ export class Root extends Location {
|
|
|
106
106
|
collection: boolean;
|
|
107
107
|
writeable: boolean;
|
|
108
108
|
};
|
|
109
|
+
hasLinkLocalAdresses: {
|
|
110
|
+
type: string;
|
|
111
|
+
collection: boolean;
|
|
112
|
+
writeable: boolean;
|
|
113
|
+
};
|
|
109
114
|
notify: {
|
|
110
115
|
type: string;
|
|
111
116
|
collection: boolean;
|
|
@@ -285,6 +290,11 @@ export class Root extends Location {
|
|
|
285
290
|
collection: boolean;
|
|
286
291
|
writeable: boolean;
|
|
287
292
|
};
|
|
293
|
+
hasLinkLocalAdresses: {
|
|
294
|
+
type: string;
|
|
295
|
+
collection: boolean;
|
|
296
|
+
writeable: boolean;
|
|
297
|
+
};
|
|
288
298
|
notify: {
|
|
289
299
|
type: string;
|
|
290
300
|
collection: boolean;
|