pmcf 6.64.7 → 6.65.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": "6.64.7",
3
+ "version": "6.65.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -55,7 +55,7 @@
55
55
  "filtered-map": "^1.0.0",
56
56
  "ip-utilties": "^3.13.1",
57
57
  "npm-pkgbuild": "^22.2.7",
58
- "pacc": "^11.17.5",
58
+ "pacc": "^11.17.6",
59
59
  "package-directory": "^8.2.0",
60
60
  "yaml": "^2.9.1"
61
61
  },
package/src/host.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  string_attribute,
6
6
  string_attribute_writable,
7
7
  number_attribute_writable,
8
- priority_attribute,
8
+ priority_attribute_writable,
9
9
  enum_string_attribute_writable,
10
10
  asArray
11
11
  } from "pacc";
@@ -38,7 +38,7 @@ export class host extends ServiceOwner {
38
38
  name: "deployment",
39
39
  values: new Set(["production", "development"])
40
40
  },
41
- priority: priority_attribute,
41
+ priority: priority_attribute_writable,
42
42
  weight: { ...number_attribute_writable, name: "weight" },
43
43
  serial: { ...string_attribute_writable, name: "serial" },
44
44
  vendor: { ...string_attribute_writable, name: "vendor" },
@@ -2,7 +2,8 @@ import { join } from "node:path";
2
2
  import {
3
3
  default_attribute_writable,
4
4
  default_collection_attribute_writable,
5
- enum_string_attribute_writable
5
+ enum_string_attribute_writable,
6
+ priority_attribute_writable
6
7
  } from "pacc";
7
8
  import { FAMILY_IPV4 } from "ip-utilties";
8
9
  import { addType } from "../type.mjs";
@@ -29,7 +30,8 @@ export class keepalive_cluster_member extends core {
29
30
  ...enum_string_attribute_writable,
30
31
  name: "role",
31
32
  values: new Set(Object.keys(ROLE_PRIORITIES))
32
- }
33
+ },
34
+ priority: priority_attribute_writable
33
35
  };
34
36
  static key = "cluster";
35
37
  static {
@@ -58,7 +60,14 @@ export class keepalive_cluster_member extends core {
58
60
  }
59
61
 
60
62
  get priority() {
61
- return this.owner.priority + ROLE_PRIORITIES[this.role];
63
+ return;
64
+ }
65
+
66
+ /**
67
+ * @return {number}
68
+ */
69
+ get priority() {
70
+ return this._priority ?? this.owner.priority + ROLE_PRIORITIES[this.role];
62
71
  }
63
72
  }
64
73
 
@@ -142,7 +151,9 @@ export class keepalived extends CoreService {
142
151
  cfg.push(" authentication {");
143
152
  cfg.push(" auth_type PASS");
144
153
  cfg.push(" auth_pass pass1234");
145
- cfg.push(` # auth_pass file:\${_ENV CREDENTIALS_DIRECTORY}/keepalived.${cluster.name}.password`);
154
+ cfg.push(
155
+ ` # auth_pass file:\${_ENV CREDENTIALS_DIRECTORY}/keepalived.${cluster.name}.password`
156
+ );
146
157
  cfg.push(" # auth_pass ${_ENV " + cred.localName + "}");
147
158
  cfg.push(" # auth_pass ${" + cred.localName + "}");
148
159
  cfg.push(" }");
package/src/type.mjs CHANGED
@@ -36,7 +36,6 @@ function error(message, attribute) {
36
36
 
37
37
  export function assign(attribute, object, value) {
38
38
  value = toInternal(value, attribute);
39
- value ??= attribute.default;
40
39
 
41
40
  if (value !== undefined) {
42
41
  // set backpointer early so that parent properties can be found during load