pmcf 6.1.9 → 6.2.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
package/src/core-service.mjs
CHANGED
|
@@ -16,7 +16,8 @@ import {
|
|
|
16
16
|
DomainNameEndpoint,
|
|
17
17
|
HTTPEndpoint,
|
|
18
18
|
UnixEndpoint,
|
|
19
|
-
addType
|
|
19
|
+
addType,
|
|
20
|
+
FAMILY_UNIX
|
|
20
21
|
} from "pmcf";
|
|
21
22
|
import { asArray } from "./utils.mjs";
|
|
22
23
|
import { networkAddressAttributes } from "./common-attributes.mjs";
|
|
@@ -135,7 +136,7 @@ export class CoreService extends Base {
|
|
|
135
136
|
|
|
136
137
|
for (const e of data) {
|
|
137
138
|
switch (e.family) {
|
|
138
|
-
case
|
|
139
|
+
case FAMILY_UNIX:
|
|
139
140
|
result.push(new UnixEndpoint(this, e.path, e));
|
|
140
141
|
break;
|
|
141
142
|
|
package/src/endpoint.mjs
CHANGED
|
@@ -2,6 +2,8 @@ import { FAMILY_IPV6 } from "ip-utilties";
|
|
|
2
2
|
import { addType } from "pmcf";
|
|
3
3
|
import { endpointAttributes, CoreService } from "./core-service.mjs";
|
|
4
4
|
|
|
5
|
+
export const FAMILY_UNIX = "unix";
|
|
6
|
+
|
|
5
7
|
class BaseEndpoint {
|
|
6
8
|
static name = "endpoint";
|
|
7
9
|
static priority = 1.1;
|
|
@@ -198,7 +200,7 @@ export class UnixEndpoint extends BaseEndpoint {
|
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
get family() {
|
|
201
|
-
return
|
|
203
|
+
return FAMILY_UNIX;
|
|
202
204
|
}
|
|
203
205
|
|
|
204
206
|
get host() {
|
package/src/service-types.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FAMILY_IPV4, FAMILY_IPV6 } from "ip-utilties";
|
|
2
|
+
import { FAMILY_UNIX } from "./endpoint.mjs";
|
|
2
3
|
|
|
3
4
|
export const ServiceTypes = {
|
|
4
5
|
"alpm-repo": {
|
|
@@ -83,7 +84,7 @@ export const ServiceTypes = {
|
|
|
83
84
|
]
|
|
84
85
|
},
|
|
85
86
|
ldapi: {
|
|
86
|
-
endpoints: [{ family:
|
|
87
|
+
endpoints: [{ family: FAMILY_UNIX, scheme: "ldapi", path: "/run/ldapi" }]
|
|
87
88
|
},
|
|
88
89
|
http: {
|
|
89
90
|
endpoints: [
|
package/src/services/chrony.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
import { FAMILY_IPV4, FAMILY_IPV6 } from "ip-utilties";
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
4
|
import { isLinkLocal } from "ip-utilties";
|
|
5
|
-
import { serviceEndpoints, addType, ExtraSourceService } from "pmcf";
|
|
5
|
+
import { serviceEndpoints, addType, ExtraSourceService, FAMILY_UNIX } from "pmcf";
|
|
6
6
|
import { writeLines } from "../utils.mjs";
|
|
7
7
|
|
|
8
8
|
export class chrony extends ExtraSourceService {
|
|
@@ -25,7 +25,7 @@ export class chrony extends ExtraSourceService {
|
|
|
25
25
|
tls: false
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
family:
|
|
28
|
+
family: FAMILY_UNIX,
|
|
29
29
|
path: "/var/run/chrony/chronyd.sock"
|
|
30
30
|
}
|
|
31
31
|
]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FAMILY_IPV4 } from "ip-utilties";
|
|
2
|
-
import { CoreService, addType } from "pmcf";
|
|
2
|
+
import { CoreService, addType, FAMILY_UNIX } from "pmcf";
|
|
3
3
|
|
|
4
4
|
export class headscale extends CoreService {
|
|
5
5
|
static service = {
|
|
6
6
|
endpoints: [
|
|
7
7
|
{
|
|
8
|
-
family:
|
|
8
|
+
family: FAMILY_UNIX,
|
|
9
9
|
path: "/run/headscale/headscale.sock"
|
|
10
10
|
},
|
|
11
11
|
{
|
package/src/services/kea.mjs
CHANGED
|
@@ -17,7 +17,8 @@ import {
|
|
|
17
17
|
sortDescendingByPriority,
|
|
18
18
|
serviceEndpoints,
|
|
19
19
|
SUBNET_LOCALHOST_IPV4,
|
|
20
|
-
SUBNET_LOCALHOST_IPV6
|
|
20
|
+
SUBNET_LOCALHOST_IPV6,
|
|
21
|
+
FAMILY_UNIX
|
|
21
22
|
} from "pmcf";
|
|
22
23
|
import { writeLines } from "../utils.mjs";
|
|
23
24
|
|
|
@@ -106,7 +107,7 @@ export class kea extends CoreService {
|
|
|
106
107
|
"kea-control-dhcp4": {
|
|
107
108
|
endpoints: [
|
|
108
109
|
{
|
|
109
|
-
family:
|
|
110
|
+
family: FAMILY_UNIX,
|
|
110
111
|
path: "/run/kea/ctrl-4"
|
|
111
112
|
}
|
|
112
113
|
]
|
|
@@ -114,7 +115,7 @@ export class kea extends CoreService {
|
|
|
114
115
|
"kea-control-dhcp6": {
|
|
115
116
|
endpoints: [
|
|
116
117
|
{
|
|
117
|
-
family:
|
|
118
|
+
family: FAMILY_UNIX,
|
|
118
119
|
path: "/run/kea/ctrl-6"
|
|
119
120
|
}
|
|
120
121
|
]
|
|
@@ -122,7 +123,7 @@ export class kea extends CoreService {
|
|
|
122
123
|
"kea-control-ddns": {
|
|
123
124
|
endpoints: [
|
|
124
125
|
{
|
|
125
|
-
family:
|
|
126
|
+
family: FAMILY_UNIX,
|
|
126
127
|
path: "/run/kea/ctrl-ddns"
|
|
127
128
|
}
|
|
128
129
|
]
|
|
@@ -272,7 +273,7 @@ export class kea extends CoreService {
|
|
|
272
273
|
|
|
273
274
|
const toUnix = endpoint => {
|
|
274
275
|
return {
|
|
275
|
-
"socket-type":
|
|
276
|
+
"socket-type": FAMILY_UNIX,
|
|
276
277
|
"socket-name": endpoint?.path
|
|
277
278
|
};
|
|
278
279
|
};
|