pmcf 2.72.0 → 2.73.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.72.0",
3
+ "version": "2.73.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -56,7 +56,7 @@
56
56
  "pkg-dir": "^8.0.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^24.0.4",
59
+ "@types/node": "^24.0.6",
60
60
  "ava": "^6.4.0",
61
61
  "c8": "^10.1.3",
62
62
  "documentation": "^14.0.3",
package/src/endpoint.mjs CHANGED
@@ -13,6 +13,11 @@ class BaseEndpoint {
13
13
  return this._type ?? this.service.type;
14
14
  }
15
15
 
16
+ get priority()
17
+ {
18
+ return this.service.priority;
19
+ }
20
+
16
21
  toString() {
17
22
  return `${this.type}`;
18
23
  }
@@ -102,8 +102,20 @@ export class ChronyService extends ExtraSourceService {
102
102
  e.service.host !== host &&
103
103
  e.networkInterface?.kind !== "loopback",
104
104
 
105
- select: endpoint =>
106
- `${endpoint.isPool ? "pool" : "server"} ${endpoint.address} iburst`
105
+ select: endpoint => {
106
+ const options = [
107
+ endpoint.isPool ? "pool" : "server",
108
+ endpoint.address,
109
+ "iburst"
110
+ ];
111
+ if (endpoint.isPool) {
112
+ options.push("maxsources 2");
113
+ }
114
+ if (endpoint.priority > 300 && endpoint.family !== "IPv6") {
115
+ options.push("prefer");
116
+ }
117
+ return options.join(" ");
118
+ }
107
119
  }),
108
120
  `mailonchange ${this.administratorEmail} 0.5`,
109
121
  "local stratum 10 orphan",
@@ -54,6 +54,7 @@ declare class BaseEndpoint {
54
54
  _type: any;
55
55
  service: any;
56
56
  get type(): any;
57
+ get priority(): any;
57
58
  toString(): string;
58
59
  }
59
60
  export {};