pmcf 6.69.0 → 6.69.2
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 +2 -2
- package/src/base.mjs +0 -4
- package/src/core-service.mjs +17 -16
- package/src/host.mjs +4 -2
- package/src/owner.mjs +0 -5
- package/src/services/keepalived.mjs +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.69.
|
|
3
|
+
"version": "6.69.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
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.
|
|
57
|
+
"npm-pkgbuild": "^22.2.20",
|
|
58
58
|
"pacc": "^14.4.0",
|
|
59
59
|
"package-directory": "^8.2.0",
|
|
60
60
|
"yaml": "^2.9.1"
|
package/src/base.mjs
CHANGED
package/src/core-service.mjs
CHANGED
|
@@ -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
|
-
|
|
169
|
-
|
|
170
|
-
if (
|
|
171
|
-
(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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.
|
|
139
|
+
...[...this.networkInterfaces.values()]
|
|
140
|
+
.filter(ni => ni.services.size > 0)
|
|
141
|
+
.map(ni => ni._services)
|
|
140
142
|
]);
|
|
141
143
|
}
|
|
142
144
|
|
|
@@ -210,7 +212,7 @@ export class host extends ServiceOwner {
|
|
|
210
212
|
|
|
211
213
|
get network() {
|
|
212
214
|
for (const ni of this.networkInterfaces.values()) {
|
|
213
|
-
if (ni.
|
|
215
|
+
if (ni._network) {
|
|
214
216
|
return ni._network;
|
|
215
217
|
}
|
|
216
218
|
}
|
package/src/owner.mjs
CHANGED
|
@@ -33,11 +33,6 @@ export class owner extends ServiceOwner {
|
|
|
33
33
|
networkInterfaces: networkInterfaces_attribute,
|
|
34
34
|
owners: owners_attribute,
|
|
35
35
|
country: { ...string_attribute_writable, name: "country" },
|
|
36
|
-
smtpServer: {
|
|
37
|
-
...string_attribute_writable,
|
|
38
|
-
name: "smtpServer",
|
|
39
|
-
deferredExpression: true
|
|
40
|
-
},
|
|
41
36
|
domain: { ...string_attribute_writable, name: "domain" },
|
|
42
37
|
domains: { ...string_set_attribute_writable, skipEmpty: true, name: "domains" },
|
|
43
38
|
timezone: { ...string_attribute_writable, name: "timezone" },
|
|
@@ -2,11 +2,13 @@ import { join } from "node:path";
|
|
|
2
2
|
import {
|
|
3
3
|
default_attribute_writable,
|
|
4
4
|
default_collection_attribute_writable,
|
|
5
|
+
string_attribute_writable,
|
|
5
6
|
enum_string_attribute_writable,
|
|
6
7
|
priority_attribute_writable,
|
|
7
8
|
email_attribute_writable
|
|
8
9
|
} from "pacc";
|
|
9
10
|
import { FAMILY_IPV4, FAMILY_IPV6 } from "ip-utilties";
|
|
11
|
+
import { SOURCES_THIS_EXTENDS } from "../common-attributes.mjs";
|
|
10
12
|
import { addType } from "../type.mjs";
|
|
11
13
|
import { PROTOCOL_TCP } from "../constants.mjs";
|
|
12
14
|
import { core } from "../core.mjs";
|
|
@@ -84,10 +86,18 @@ export class keepalived extends CoreService {
|
|
|
84
86
|
type: keepalive_cluster_member,
|
|
85
87
|
name: "clusters"
|
|
86
88
|
},
|
|
89
|
+
smtp_server: {
|
|
90
|
+
...string_attribute_writable,
|
|
91
|
+
name: "smtp_server",
|
|
92
|
+
deferredExpression: true,
|
|
93
|
+
scope: SCOPE_KEEPALIVED
|
|
94
|
+
},
|
|
95
|
+
|
|
87
96
|
notification_email_from: {
|
|
88
97
|
...email_attribute_writable,
|
|
89
98
|
name: "notification_email_from",
|
|
90
99
|
default: "keepalived",
|
|
100
|
+
sources: SOURCES_THIS_EXTENDS,
|
|
91
101
|
scope: SCOPE_KEEPALIVED
|
|
92
102
|
}
|
|
93
103
|
};
|
|
@@ -103,10 +113,10 @@ export class keepalived extends CoreService {
|
|
|
103
113
|
|
|
104
114
|
const extra = [];
|
|
105
115
|
|
|
106
|
-
const
|
|
116
|
+
const smtp_server = this.smtp_server;
|
|
107
117
|
|
|
108
|
-
if (
|
|
109
|
-
extra.push(` smtp_server ${
|
|
118
|
+
if (smtp_server) {
|
|
119
|
+
extra.push(` smtp_server ${smtp_server.address}`);
|
|
110
120
|
}
|
|
111
121
|
|
|
112
122
|
const cfg = [
|