pmcf 2.0.0 → 2.1.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": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -69,7 +69,7 @@ export async function generateNetworkDefs(host, packageData) {
69
69
  ...networkSectionExtra,
70
70
  DHCP: "no",
71
71
  DHCPServer: "no",
72
- MulticastDNS: "yes",
72
+ MulticastDNS: ni.network.multicastDNS ? "yes" : "no",
73
73
  LinkLocalAddressing: "ipv6",
74
74
  IPv6LinkLocalAddressGenerationMode: "stable-privacy"
75
75
  }),
@@ -5,7 +5,8 @@ export const networkProperties = {
5
5
  psk: { type: "string", collection: false, writeable: true },
6
6
  metric: { type: "number", collection: false, writeable: true },
7
7
  MTU: { type: "number", collection: false, writeable: true },
8
- gateway: { type: "host", collection: false, writeable: true }
8
+ gateway: { type: "host", collection: false, writeable: true },
9
+ multicastDNS: { type: "boolean", collection: false, writeable: true }
9
10
  };
10
11
 
11
12
  export const networkAddressProperties = {
package/src/service.mjs CHANGED
@@ -207,7 +207,7 @@ export class Service extends Base {
207
207
  DNSRecord(
208
208
  dnsFullName(`${this.srvPrefix}.${domainName}`),
209
209
  "SRV",
210
- this.priority,
210
+ this.priority || 10,
211
211
  this.weight,
212
212
  this.port,
213
213
  dnsFullName(this.domainName)
@@ -151,13 +151,6 @@ export class DNSService extends Service {
151
151
  }
152
152
 
153
153
  get systemdConfig() {
154
- /* console.log([
155
- ...this.findServices({
156
- ...DNS_SERVICE_FILTER,
157
- priority: "<10"
158
- })
159
- ].map((s)=>`${s.owner.name}[${s.priority}]`));
160
- */
161
154
  return [
162
155
  "Resolve",
163
156
  {
@@ -171,7 +164,7 @@ export class DNSService extends Service {
171
164
  }).join(" "),
172
165
  Domains: [...this.domains].join(" "),
173
166
  DNSSEC: "no",
174
- MulticastDNS: "yes",
167
+ MulticastDNS: this.network.multicastDNS ? "yes" : "no",
175
168
  LLMNR: "no"
176
169
  }
177
170
  ];
package/types/host.d.mts CHANGED
@@ -391,6 +391,11 @@ export class NetworkInterface extends Base {
391
391
  collection: boolean;
392
392
  writeable: boolean;
393
393
  };
394
+ multicastDNS: {
395
+ type: string;
396
+ collection: boolean;
397
+ writeable: boolean;
398
+ };
394
399
  };
395
400
  };
396
401
  _ipAddresses: Map<any, any>;
@@ -52,9 +52,7 @@ export namespace networkProperties {
52
52
  let writeable_6: boolean;
53
53
  export { writeable_6 as writeable };
54
54
  }
55
- }
56
- export namespace networkAddressProperties {
57
- namespace hostName {
55
+ namespace multicastDNS {
58
56
  let type_7: string;
59
57
  export { type_7 as type };
60
58
  let collection_7: boolean;
@@ -62,7 +60,9 @@ export namespace networkAddressProperties {
62
60
  let writeable_7: boolean;
63
61
  export { writeable_7 as writeable };
64
62
  }
65
- namespace cidrAddresses {
63
+ }
64
+ export namespace networkAddressProperties {
65
+ namespace hostName {
66
66
  let type_8: string;
67
67
  export { type_8 as type };
68
68
  let collection_8: boolean;
@@ -70,7 +70,7 @@ export namespace networkAddressProperties {
70
70
  let writeable_8: boolean;
71
71
  export { writeable_8 as writeable };
72
72
  }
73
- namespace cidrAddress {
73
+ namespace cidrAddresses {
74
74
  let type_9: string;
75
75
  export { type_9 as type };
76
76
  let collection_9: boolean;
@@ -78,7 +78,7 @@ export namespace networkAddressProperties {
78
78
  let writeable_9: boolean;
79
79
  export { writeable_9 as writeable };
80
80
  }
81
- namespace rawAddresses {
81
+ namespace cidrAddress {
82
82
  let type_10: string;
83
83
  export { type_10 as type };
84
84
  let collection_10: boolean;
@@ -86,7 +86,7 @@ export namespace networkAddressProperties {
86
86
  let writeable_10: boolean;
87
87
  export { writeable_10 as writeable };
88
88
  }
89
- namespace rawAddress {
89
+ namespace rawAddresses {
90
90
  let type_11: string;
91
91
  export { type_11 as type };
92
92
  let collection_11: boolean;
@@ -94,4 +94,12 @@ export namespace networkAddressProperties {
94
94
  let writeable_11: boolean;
95
95
  export { writeable_11 as writeable };
96
96
  }
97
+ namespace rawAddress {
98
+ let type_12: string;
99
+ export { type_12 as type };
100
+ let collection_12: boolean;
101
+ export { collection_12 as collection };
102
+ let writeable_12: boolean;
103
+ export { writeable_12 as writeable };
104
+ }
97
105
  }
@@ -176,6 +176,11 @@ export class Network extends Owner {
176
176
  collection: boolean;
177
177
  writeable: boolean;
178
178
  };
179
+ multicastDNS: {
180
+ type: string;
181
+ collection: boolean;
182
+ writeable: boolean;
183
+ };
179
184
  };
180
185
  };
181
186
  kind: any;