pmcf 1.73.2 → 1.74.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "1.73.2",
3
+ "version": "1.74.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/dns.mjs CHANGED
@@ -211,12 +211,13 @@ async function generateZoneDefs(dns, targetDir) {
211
211
  };
212
212
  };
213
213
 
214
- for await (const mail of dns.owner.findServices({ type: "smtp" })) {
214
+ for (const mail of dns.owner.findServices({ type: "smtp" })) {
215
215
  records.add(
216
- createRecord("@", "MX", mail.priority, fullName(mail.owner.domainName))
216
+ createRecord("@", "MX", mail.priority, fullName(mail.ipAddressOrDomainName))
217
217
  );
218
218
  }
219
219
 
220
+ console.log(`${nameService}`,nameService.ipAddressOrDomainName);
220
221
  //console.log(dns.owner.fullName, domain, nameService.domainName, rname);
221
222
  const reverseZones = new Map();
222
223
 
@@ -228,7 +229,7 @@ async function generateZoneDefs(dns, targetDir) {
228
229
  `(${updates})`
229
230
  );
230
231
 
231
- const NSRecord = createRecord("@", "NS", fullName(nameService.rawAddress));
232
+ const NSRecord = createRecord("@", "NS", fullName(nameService.ipAddressOrDomainName));
232
233
 
233
234
  const zone = {
234
235
  id: domain,
package/src/host.mjs CHANGED
@@ -26,6 +26,7 @@ const HostTypeDefinition = {
26
26
  owners: ["owner", "network", "root"],
27
27
  extends: Base.typeDefinition,
28
28
  properties: {
29
+ ...networkAddressProperties,
29
30
  networkInterfaces: {
30
31
  type: "network_interface",
31
32
  collection: true,
@@ -45,9 +46,6 @@ const HostTypeDefinition = {
45
46
  depends: { type: "string", collection: true, writeable: true },
46
47
  provides: { type: "string", collection: true, writeable: true },
47
48
  extends: { type: "host", collection: true, writeable: true },
48
- cidrAddresses: { type: "string", collection: true, writeable: false },
49
- rawAddresses: { type: "string", collection: true, writeable: false },
50
- rawAddress: { type: "string", collection: false, writeable: false },
51
49
  model: { type: "string", collection: false, writeable: false },
52
50
  isModel: { type: "boolean", collection: false, writeable: false }
53
51
  }
package/src/service.mjs CHANGED
@@ -92,6 +92,10 @@ export class Service extends Base {
92
92
  return this.server.domainName;
93
93
  }
94
94
 
95
+ get ipAddressOrDomainName() {
96
+ return this.rawAddress || this.domainName;
97
+ }
98
+
95
99
  get rawAddresses() {
96
100
  return this.#ipAddresses || this.owner.rawAddresses;
97
101
  }
package/types/host.d.mts CHANGED
@@ -116,27 +116,32 @@ export class Host extends Base {
116
116
  collection: boolean;
117
117
  writeable: boolean;
118
118
  };
119
- cidrAddresses: {
119
+ model: {
120
120
  type: string;
121
121
  collection: boolean;
122
122
  writeable: boolean;
123
123
  };
124
- rawAddresses: {
124
+ isModel: {
125
125
  type: string;
126
126
  collection: boolean;
127
127
  writeable: boolean;
128
128
  };
129
- rawAddress: {
129
+ cidrAddresses: {
130
130
  type: string;
131
131
  collection: boolean;
132
132
  writeable: boolean;
133
133
  };
134
- model: {
134
+ cidrAddress: {
135
135
  type: string;
136
136
  collection: boolean;
137
137
  writeable: boolean;
138
138
  };
139
- isModel: {
139
+ rawAddresses: {
140
+ type: string;
141
+ collection: boolean;
142
+ writeable: boolean;
143
+ };
144
+ rawAddress: {
140
145
  type: string;
141
146
  collection: boolean;
142
147
  writeable: boolean;
@@ -117,6 +117,7 @@ export class Service extends Base {
117
117
  alias: any;
118
118
  get server(): any;
119
119
  get domainName(): any;
120
+ get ipAddressOrDomainName(): any;
120
121
  get rawAddresses(): any;
121
122
  get rawAddress(): any;
122
123
  set ipAddresses(value: any);