pmcf 6.44.2 → 6.44.3
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 +1 -1
- package/src/core-service.mjs +12 -12
- package/src/services/mosquitto.mjs +3 -2
package/package.json
CHANGED
package/src/core-service.mjs
CHANGED
|
@@ -66,7 +66,7 @@ export class CoreService extends base {
|
|
|
66
66
|
},
|
|
67
67
|
priority: priority_attribute,
|
|
68
68
|
weight: { ...number_attribute_writable, name: "weight" /*default: 1*/ },
|
|
69
|
-
types: { ...string_set_attribute_writable, name: "types"},
|
|
69
|
+
types: { ...string_set_attribute_writable, name: "types" },
|
|
70
70
|
systemdService: { ...string_attribute_writable, name: "systemdService" },
|
|
71
71
|
systemUserName: { ...string_attribute_writable, name: "systemUserName" },
|
|
72
72
|
systemGroupName: { ...string_attribute_writable, name: "systemGroupName" }
|
|
@@ -119,10 +119,19 @@ export class CoreService extends base {
|
|
|
119
119
|
endpoints(filter) {
|
|
120
120
|
const data = serviceTypeEndpoints(ServiceTypes[this.type], true);
|
|
121
121
|
const result = [];
|
|
122
|
+
const domainNames = new Set();
|
|
122
123
|
|
|
123
|
-
|
|
124
|
+
let type;
|
|
125
|
+
if (typeof filter === "string") {
|
|
126
|
+
type = filter;
|
|
127
|
+
filter = undefined;
|
|
128
|
+
}
|
|
124
129
|
|
|
125
130
|
for (const e of data) {
|
|
131
|
+
if (type && e.type.name !== type) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
|
|
126
135
|
switch (e.family) {
|
|
127
136
|
case FAMILY_UNIX:
|
|
128
137
|
result.push(new unix_endpoint(this, e.path, e));
|
|
@@ -158,16 +167,7 @@ export class CoreService extends base {
|
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
|
|
161
|
-
|
|
162
|
-
case "string":
|
|
163
|
-
return result.filter(endpoint => endpoint.type === filter);
|
|
164
|
-
|
|
165
|
-
case "undefined":
|
|
166
|
-
return result;
|
|
167
|
-
|
|
168
|
-
default:
|
|
169
|
-
return result.filter(filter);
|
|
170
|
-
}
|
|
170
|
+
return filter ? result.filter(filter) : result;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
endpoint(filter) {
|
|
@@ -15,6 +15,7 @@ export class mosquitto extends CoreService {
|
|
|
15
15
|
name: "listener",
|
|
16
16
|
writable: true,
|
|
17
17
|
configurable: true
|
|
18
|
+
// alias port
|
|
18
19
|
// endpoints[type='mqtt']/port
|
|
19
20
|
},
|
|
20
21
|
persistence_location: {
|
|
@@ -42,11 +43,11 @@ export class mosquitto extends CoreService {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
set listener(value) {
|
|
45
|
-
this.
|
|
46
|
+
this.port = value;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
get listener() {
|
|
49
|
-
return this.
|
|
50
|
+
return this.port;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
async *preparePackages(dir) {
|