pmcf 6.68.15 → 6.69.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": "6.68.15",
3
+ "version": "6.69.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,8 +54,8 @@
54
54
  "content-entry-transform": "^1.7.11",
55
55
  "filtered-map": "^1.0.0",
56
56
  "ip-utilties": "^3.13.1",
57
- "npm-pkgbuild": "^22.2.19",
58
- "pacc": "^14.3.0",
57
+ "npm-pkgbuild": "^22.2.20",
58
+ "pacc": "^14.4.0",
59
59
  "package-directory": "^8.2.0",
60
60
  "yaml": "^2.9.1"
61
61
  },
@@ -165,27 +165,28 @@ export class CoreService extends base {
165
165
  this._port === undefined ? { ...e } : { ...e, port: this._port };
166
166
  delete options.kind;
167
167
 
168
- for (const na of this.host.networkAddresses()) {
169
- if (e.family !== FAMILY_DNS) {
170
- if (
171
- (e.family && e.family !== na.family) ||
172
- (e.kind && e.kind !== na.networkInterface.kind)
173
- ) {
174
- continue;
168
+ if (this.host) {
169
+ for (const na of this.host.networkAddresses()) {
170
+ if (e.family !== FAMILY_DNS) {
171
+ if (
172
+ (e.family && e.family !== na.family) ||
173
+ (e.kind && e.kind !== na.networkInterface.kind)
174
+ ) {
175
+ continue;
176
+ }
175
177
  }
176
- }
177
178
 
178
- if (e.scheme || e.pathname) {
179
- const he = new url_endpoint(this, na, options);
180
- if (!seen.has(he.url.toString())) {
181
- seen.add(he.url.toString());
182
- result.push(he);
179
+ if (e.scheme || e.pathname) {
180
+ const he = new url_endpoint(this, na, options);
181
+ if (!seen.has(he.url.toString())) {
182
+ seen.add(he.url.toString());
183
+ result.push(he);
184
+ }
185
+ } else {
186
+ result.push(new endpoint(this, na, options));
183
187
  }
184
- } else {
185
- result.push(new endpoint(this, na, options));
186
188
  }
187
189
  }
188
-
189
190
  if (!domainNames.has(this.domainName)) {
190
191
  domainNames.add(this.domainName);
191
192
  result.push(new domain_endpoint(this, this.domainName, options));
package/src/host.mjs CHANGED
@@ -136,7 +136,9 @@ export class host extends ServiceOwner {
136
136
  get services() {
137
137
  return new AggregatedMap([
138
138
  this._services,
139
- ...this._networkInterfaces.values().map(ni => ni._services)
139
+ ...[...this.networkInterfaces.values()]
140
+ .filter(ni => ni.services.size > 0)
141
+ .map(ni => ni._services)
140
142
  ]);
141
143
  }
142
144
 
package/src/owner.mjs CHANGED
@@ -5,7 +5,7 @@ import { FilteredMap } from "filtered-map";
5
5
  import {
6
6
  string_set_attribute_writable,
7
7
  string_attribute_writable,
8
- email_attribute,
8
+ email_attribute_writable,
9
9
  asArray
10
10
  } from "pacc";
11
11
  import { union } from "./utils.mjs";
@@ -54,9 +54,8 @@ export class owner extends ServiceOwner {
54
54
  description: "unix locale"
55
55
  },
56
56
  administratorEmail: {
57
- ...email_attribute,
58
- name: "administratorEmail",
59
- writable: true
57
+ ...email_attribute_writable,
58
+ name: "administratorEmail"
60
59
  }
61
60
  };
62
61
 
@@ -3,7 +3,8 @@ import {
3
3
  default_attribute_writable,
4
4
  default_collection_attribute_writable,
5
5
  enum_string_attribute_writable,
6
- priority_attribute_writable
6
+ priority_attribute_writable,
7
+ email_attribute_writable
7
8
  } from "pacc";
8
9
  import { FAMILY_IPV4, FAMILY_IPV6 } from "ip-utilties";
9
10
  import { addType } from "../type.mjs";
@@ -73,6 +74,8 @@ export class keepalive_cluster_member extends core {
73
74
 
74
75
  const states = ["master", "backup", "fault"];
75
76
 
77
+ const SCOPE_KEEPALIVED = "keepalived";
78
+
76
79
  export class keepalived extends CoreService {
77
80
  static priority = 1.5;
78
81
  static attributes = {
@@ -80,6 +83,12 @@ export class keepalived extends CoreService {
80
83
  ...default_collection_attribute_writable,
81
84
  type: keepalive_cluster_member,
82
85
  name: "clusters"
86
+ },
87
+ notification_email_from: {
88
+ ...email_attribute_writable,
89
+ name: "notification_email_from",
90
+ default: "keepalived",
91
+ scope: SCOPE_KEEPALIVED
83
92
  }
84
93
  };
85
94
 
@@ -106,7 +115,7 @@ export class keepalived extends CoreService {
106
115
  " " + this.administratorEmail,
107
116
  " }",
108
117
  ...extra,
109
- ` notification_email_from keepalived@${this.domainName}`,
118
+ ` notification_email_from ${this.notification_email_from}`,
110
119
  " enable_script_security",
111
120
  " script_user root",
112
121
  " max_auto_priority 20",