pmcf 1.52.3 → 1.52.5

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.
@@ -100,7 +100,7 @@ async function generateNamedDefs(owner, targetDir) {
100
100
 
101
101
  if (!addresses.has(address)) {
102
102
  addresses.add(address);
103
-
103
+
104
104
  zone.records.add(
105
105
  createRecord(
106
106
  fullName(host.domainName),
@@ -108,6 +108,28 @@ async function generateNamedDefs(owner, targetDir) {
108
108
  normalizeIPAddress(address)
109
109
  )
110
110
  );
111
+
112
+ if (subnet) {
113
+ let reverseZone = reverseZones.get(subnet.address);
114
+
115
+ if (!reverseZone) {
116
+ const reverseArpa = reverseArpaAddress(subnet.prefix);
117
+ reverseZone = {
118
+ id: reverseArpa,
119
+ file: `${reverseArpa}.zone`,
120
+ records: new Set([SOARecord, NSRecord])
121
+ };
122
+ zones.push(reverseZone);
123
+ reverseZones.set(subnet.address, reverseZone);
124
+ }
125
+ reverseZone.records.add(
126
+ createRecord(
127
+ fullName(reverseArpaAddress(address)),
128
+ "PTR",
129
+ fullName(host.domainName)
130
+ )
131
+ );
132
+ }
111
133
  }
112
134
 
113
135
  if (!hosts.has(host)) {
@@ -132,28 +154,6 @@ async function generateNamedDefs(owner, targetDir) {
132
154
  );
133
155
  }
134
156
  }
135
-
136
- if (subnet) {
137
- let reverseZone = reverseZones.get(subnet.address);
138
-
139
- if (!reverseZone) {
140
- const reverseArpa = reverseArpaAddress(subnet.prefix);
141
- reverseZone = {
142
- id: reverseArpa,
143
- file: `${reverseArpa}.zone`,
144
- records: new Set([SOARecord, NSRecord])
145
- };
146
- zones.push(reverseZone);
147
- reverseZones.set(subnet.address, reverseZone);
148
- }
149
- reverseZone.records.add(
150
- createRecord(
151
- fullName(reverseArpaAddress(address)),
152
- "PTR",
153
- fullName(host.domainName)
154
- )
155
- );
156
- }
157
157
  }
158
158
  }
159
159
 
@@ -205,18 +205,18 @@ async function generateNamedDefs(owner, targetDir) {
205
205
  export function reverseAddress(address) {
206
206
  if (isIPv6Address(address)) {
207
207
  return normalizeIPAddress(address)
208
- .replaceAll(":", "")
209
- .split("")
210
- .reverse()
211
- .join(".");
208
+ .replaceAll(":", "")
209
+ .split("")
210
+ .reverse()
211
+ .join(".");
212
212
  }
213
213
 
214
- return address.split(".").reverse().join(".");
214
+ return address.split(".").reverse().join(".");
215
215
  }
216
216
 
217
217
  export function reverseArpaAddress(address) {
218
218
  return (
219
219
  reverseAddress(address) +
220
- (isIPv6Address(address) ? ".ip6.arpa" : ".in-addr.arpa")
220
+ (isIPv6Address(address) ? ".ip6.arpa" : ".in-addr.arpa")
221
221
  );
222
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.52.3",
3
+ "version": "1.52.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/dns.mjs CHANGED
@@ -9,7 +9,10 @@ const DNSServiceTypeDefinition = {
9
9
  hasSVRRecords: { type: "boolean", collection: false, writeable: true },
10
10
  hasCatalog: { type: "boolean", collection: false, writeable: true },
11
11
  recordTTL: { type: "string", collection: false, writeable: true },
12
- soaUpdates: { type: "number", collection: true, writeable: true },
12
+ refresh: { type: "string", collection: false, writeable: true },
13
+ retry: { type: "string", collection: false, writeable: true },
14
+ expire: { type: "string", collection: false, writeable: true },
15
+ minimum: { type: "string", collection: false, writeable: true },
13
16
  forwardsTo: { type: "network", collection: true, writeable: true },
14
17
  allowedUpdates: { type: "string", collection: true, writeable: true }
15
18
  }
@@ -18,11 +21,15 @@ const DNSServiceTypeDefinition = {
18
21
  export class DNSService extends Base {
19
22
  allowedUpdates = [];
20
23
  recordTTL = "1W";
21
- soaUpdates = [36000, 72000, 600000, 60000];
22
24
  hasSVRRecords = true;
23
25
  hasCatalog = true;
24
26
  #forwardsTo = [];
25
27
 
28
+ refresh = 36000;
29
+ retry = 72000;
30
+ expire = 600000;
31
+ minimum = 60000;
32
+
26
33
  static {
27
34
  addType(this);
28
35
  }
@@ -39,6 +46,10 @@ export class DNSService extends Base {
39
46
  this.read(data, DNSServiceTypeDefinition);
40
47
  }
41
48
 
49
+ get soaUpdates() {
50
+ return [this.refresh, this.retry, this.expire, this.minimum];
51
+ }
52
+
42
53
  set forwardsTo(value) {
43
54
  this.#forwardsTo.push(value);
44
55
  }
@@ -102,7 +102,22 @@ export class Cluster extends Owner {
102
102
  collection: boolean;
103
103
  writeable: boolean;
104
104
  };
105
- soaUpdates: {
105
+ refresh: {
106
+ type: string;
107
+ collection: boolean;
108
+ writeable: boolean;
109
+ };
110
+ retry: {
111
+ type: string;
112
+ collection: boolean;
113
+ writeable: boolean;
114
+ };
115
+ expire: {
116
+ type: string;
117
+ collection: boolean;
118
+ writeable: boolean;
119
+ };
120
+ minimum: {
106
121
  type: string;
107
122
  collection: boolean;
108
123
  writeable: boolean;
@@ -256,7 +271,22 @@ export class Cluster extends Owner {
256
271
  collection: boolean;
257
272
  writeable: boolean;
258
273
  };
259
- soaUpdates: {
274
+ refresh: {
275
+ type: string;
276
+ collection: boolean;
277
+ writeable: boolean;
278
+ };
279
+ retry: {
280
+ type: string;
281
+ collection: boolean;
282
+ writeable: boolean;
283
+ };
284
+ expire: {
285
+ type: string;
286
+ collection: boolean;
287
+ writeable: boolean;
288
+ };
289
+ minimum: {
260
290
  type: string;
261
291
  collection: boolean;
262
292
  writeable: boolean;
package/types/dns.d.mts CHANGED
@@ -19,7 +19,22 @@ export class DNSService extends Base {
19
19
  collection: boolean;
20
20
  writeable: boolean;
21
21
  };
22
- soaUpdates: {
22
+ refresh: {
23
+ type: string;
24
+ collection: boolean;
25
+ writeable: boolean;
26
+ };
27
+ retry: {
28
+ type: string;
29
+ collection: boolean;
30
+ writeable: boolean;
31
+ };
32
+ expire: {
33
+ type: string;
34
+ collection: boolean;
35
+ writeable: boolean;
36
+ };
37
+ minimum: {
23
38
  type: string;
24
39
  collection: boolean;
25
40
  writeable: boolean;
@@ -38,9 +53,13 @@ export class DNSService extends Base {
38
53
  };
39
54
  allowedUpdates: any[];
40
55
  recordTTL: string;
41
- soaUpdates: number[];
42
56
  hasSVRRecords: boolean;
43
57
  hasCatalog: boolean;
58
+ refresh: number;
59
+ retry: number;
60
+ expire: number;
61
+ minimum: number;
62
+ get soaUpdates(): number[];
44
63
  set forwardsTo(value: any[]);
45
64
  get forwardsTo(): any[];
46
65
  findServices(): AsyncGenerator<any, void, any>;
@@ -102,7 +102,22 @@ export class Location extends Owner {
102
102
  collection: boolean;
103
103
  writeable: boolean;
104
104
  };
105
- soaUpdates: {
105
+ refresh: {
106
+ type: string;
107
+ collection: boolean;
108
+ writeable: boolean;
109
+ };
110
+ retry: {
111
+ type: string;
112
+ collection: boolean;
113
+ writeable: boolean;
114
+ };
115
+ expire: {
116
+ type: string;
117
+ collection: boolean;
118
+ writeable: boolean;
119
+ };
120
+ minimum: {
106
121
  type: string;
107
122
  collection: boolean;
108
123
  writeable: boolean;
@@ -256,7 +271,22 @@ export class Location extends Owner {
256
271
  collection: boolean;
257
272
  writeable: boolean;
258
273
  };
259
- soaUpdates: {
274
+ refresh: {
275
+ type: string;
276
+ collection: boolean;
277
+ writeable: boolean;
278
+ };
279
+ retry: {
280
+ type: string;
281
+ collection: boolean;
282
+ writeable: boolean;
283
+ };
284
+ expire: {
285
+ type: string;
286
+ collection: boolean;
287
+ writeable: boolean;
288
+ };
289
+ minimum: {
260
290
  type: string;
261
291
  collection: boolean;
262
292
  writeable: boolean;
@@ -104,7 +104,22 @@ export class Network extends Owner {
104
104
  collection: boolean;
105
105
  writeable: boolean;
106
106
  };
107
- soaUpdates: {
107
+ refresh: {
108
+ type: string;
109
+ collection: boolean;
110
+ writeable: boolean;
111
+ };
112
+ retry: {
113
+ type: string;
114
+ collection: boolean;
115
+ writeable: boolean;
116
+ };
117
+ expire: {
118
+ type: string;
119
+ collection: boolean;
120
+ writeable: boolean;
121
+ };
122
+ minimum: {
108
123
  type: string;
109
124
  collection: boolean;
110
125
  writeable: boolean;
package/types/owner.d.mts CHANGED
@@ -100,7 +100,22 @@ export class Owner extends Base {
100
100
  collection: boolean;
101
101
  writeable: boolean;
102
102
  };
103
- soaUpdates: {
103
+ refresh: {
104
+ type: string;
105
+ collection: boolean;
106
+ writeable: boolean;
107
+ };
108
+ retry: {
109
+ type: string;
110
+ collection: boolean;
111
+ writeable: boolean;
112
+ };
113
+ expire: {
114
+ type: string;
115
+ collection: boolean;
116
+ writeable: boolean;
117
+ };
118
+ minimum: {
104
119
  type: string;
105
120
  collection: boolean;
106
121
  writeable: boolean;
package/types/root.d.mts CHANGED
@@ -106,7 +106,22 @@ export class Root extends Location {
106
106
  collection: boolean;
107
107
  writeable: boolean;
108
108
  };
109
- soaUpdates: {
109
+ refresh: {
110
+ type: string;
111
+ collection: boolean;
112
+ writeable: boolean;
113
+ };
114
+ retry: {
115
+ type: string;
116
+ collection: boolean;
117
+ writeable: boolean;
118
+ };
119
+ expire: {
120
+ type: string;
121
+ collection: boolean;
122
+ writeable: boolean;
123
+ };
124
+ minimum: {
110
125
  type: string;
111
126
  collection: boolean;
112
127
  writeable: boolean;
@@ -260,7 +275,22 @@ export class Root extends Location {
260
275
  collection: boolean;
261
276
  writeable: boolean;
262
277
  };
263
- soaUpdates: {
278
+ refresh: {
279
+ type: string;
280
+ collection: boolean;
281
+ writeable: boolean;
282
+ };
283
+ retry: {
284
+ type: string;
285
+ collection: boolean;
286
+ writeable: boolean;
287
+ };
288
+ expire: {
289
+ type: string;
290
+ collection: boolean;
291
+ writeable: boolean;
292
+ };
293
+ minimum: {
264
294
  type: string;
265
295
  collection: boolean;
266
296
  writeable: boolean;