pmcf 3.8.9 → 3.8.11
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 +3 -3
- package/src/base.mjs +4 -6
- package/src/cluster.mjs +3 -3
- package/src/host.mjs +17 -20
- package/src/network-interfaces/network-interface.mjs +5 -6
- package/src/network-support.mjs +15 -18
- package/src/owner.mjs +8 -7
- package/src/service.mjs +4 -5
- package/src/services/bind.mjs +6 -6
- package/src/services/systemd-journal-upload.mjs +2 -2
- package/types/base.d.mts +2 -28
- package/types/cluster.d.mts +102 -154
- package/types/extra-source-service.d.mts +25 -51
- package/types/host.d.mts +68 -94
- package/types/location.d.mts +64 -116
- package/types/network-interfaces/ethernet.d.mts +60 -112
- package/types/network-interfaces/loopback.d.mts +60 -112
- package/types/network-interfaces/network-interface.d.mts +60 -112
- package/types/network-interfaces/tun.d.mts +60 -112
- package/types/network-interfaces/wireguard.d.mts +60 -112
- package/types/network-interfaces/wlan.d.mts +90 -168
- package/types/network-support.d.mts +25 -25
- package/types/network.d.mts +37 -63
- package/types/owner.d.mts +32 -58
- package/types/root.d.mts +64 -116
- package/types/service.d.mts +52 -104
- package/types/services/bind.d.mts +55 -107
- package/types/services/chrony.d.mts +50 -102
- package/types/services/headscale.d.mts +50 -102
- package/types/services/influxdb.d.mts +50 -102
- package/types/services/kea.d.mts +50 -102
- package/types/services/mosquitto.d.mts +50 -102
- package/types/services/openldap.d.mts +50 -102
- package/types/services/systemd-journal-remote.d.mts +50 -102
- package/types/services/systemd-journal-upload.d.mts +51 -103
- package/types/services/systemd-journal.d.mts +50 -102
- package/types/services/systemd-resolved.d.mts +50 -102
- package/types/services/systemd-timesyncd.d.mts +50 -102
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"ip-utilties": "^1.4.7",
|
|
55
|
-
"npm-pkgbuild": "^18.2.
|
|
56
|
-
"pacc": "^4.
|
|
55
|
+
"npm-pkgbuild": "^18.2.29",
|
|
56
|
+
"pacc": "^4.13.0",
|
|
57
57
|
"package-directory": "^8.1.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
package/src/base.mjs
CHANGED
|
@@ -2,8 +2,9 @@ import { join } from "node:path";
|
|
|
2
2
|
import { allOutputs } from "npm-pkgbuild";
|
|
3
3
|
import {
|
|
4
4
|
getAttribute,
|
|
5
|
-
|
|
5
|
+
name_attribute_writable,
|
|
6
6
|
string_attribute,
|
|
7
|
+
string_attribute_writable,
|
|
7
8
|
string_collection_attribute_writable,
|
|
8
9
|
number_attribute_writable,
|
|
9
10
|
description_attribute,
|
|
@@ -18,14 +19,11 @@ const BaseTypeDefinition = {
|
|
|
18
19
|
properties: {
|
|
19
20
|
owner: { type: "base", collection: false, writable: false },
|
|
20
21
|
type: string_attribute,
|
|
21
|
-
name:
|
|
22
|
-
...name_attribute,
|
|
23
|
-
writable: true
|
|
24
|
-
},
|
|
22
|
+
name: name_attribute_writable,
|
|
25
23
|
description: { ...description_attribute, writable: true },
|
|
26
24
|
priority: number_attribute_writable,
|
|
27
25
|
directory: { ...string_attribute, writable: false },
|
|
28
|
-
packaging:
|
|
26
|
+
packaging: string_attribute_writable,
|
|
29
27
|
disabled: boolean_attribute_writable,
|
|
30
28
|
tags: string_collection_attribute_writable
|
|
31
29
|
}
|
package/src/cluster.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
3
|
-
import {
|
|
3
|
+
import { number_attribute_writable } from "pacc";
|
|
4
4
|
import { Owner } from "./owner.mjs";
|
|
5
5
|
import { Host } from "./host.mjs";
|
|
6
6
|
import { serviceEndpoints } from "pmcf";
|
|
@@ -13,11 +13,11 @@ const ClusterTypeDefinition = {
|
|
|
13
13
|
priority: 0.7,
|
|
14
14
|
extends: Host.typeDefinition,
|
|
15
15
|
properties: {
|
|
16
|
-
routerId: { ...
|
|
16
|
+
routerId: { ...number_attribute_writable },
|
|
17
17
|
masters: { type: "network_interface", collection: true, writable: true },
|
|
18
18
|
backups: { type: "network_interface", collection: true, writable: true },
|
|
19
19
|
members: { type: "network_interface", collection: true, writable: false },
|
|
20
|
-
checkInterval: { ...
|
|
20
|
+
checkInterval: { ...number_attribute_writable }
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
|
package/src/host.mjs
CHANGED
|
@@ -3,8 +3,9 @@ import { join } from "node:path";
|
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
4
|
import {
|
|
5
5
|
string_attribute,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
string_attribute_writable,
|
|
7
|
+
string_collection_attribute_writable,
|
|
8
|
+
number_attribute_writable,
|
|
8
9
|
boolean_attribute_false
|
|
9
10
|
} from "pacc";
|
|
10
11
|
import { ServiceOwner, Base, addresses } from "pmcf";
|
|
@@ -36,26 +37,23 @@ const HostTypeDefinition = {
|
|
|
36
37
|
writable: true
|
|
37
38
|
},
|
|
38
39
|
services: { type: "service", collection: true, writable: true },
|
|
39
|
-
aliases: { ...
|
|
40
|
+
aliases: { ...string_collection_attribute_writable },
|
|
40
41
|
os: {
|
|
41
|
-
...
|
|
42
|
-
writable: true,
|
|
42
|
+
...string_attribute_writable,
|
|
43
43
|
values: ["osx", "windows", "linux"]
|
|
44
44
|
},
|
|
45
|
-
"machine-id": { ...
|
|
46
|
-
distribution: { ...
|
|
45
|
+
"machine-id": { ...string_attribute_writable },
|
|
46
|
+
distribution: { ...string_attribute_writable },
|
|
47
47
|
deployment: {
|
|
48
|
-
...
|
|
49
|
-
writable: true,
|
|
48
|
+
...string_attribute_writable,
|
|
50
49
|
values: ["production", "development"]
|
|
51
50
|
},
|
|
52
|
-
weight: { ...
|
|
53
|
-
serial: { ...
|
|
54
|
-
vendor: { ...
|
|
55
|
-
keymap: { ...
|
|
51
|
+
weight: { ...number_attribute_writable },
|
|
52
|
+
serial: { ...string_attribute_writable },
|
|
53
|
+
vendor: { ...string_attribute_writable },
|
|
54
|
+
keymap: { ...string_attribute_writable },
|
|
56
55
|
chassis: {
|
|
57
|
-
...
|
|
58
|
-
writable: true,
|
|
56
|
+
...string_attribute_writable,
|
|
59
57
|
values: [
|
|
60
58
|
"phone",
|
|
61
59
|
"tablet",
|
|
@@ -73,13 +71,12 @@ const HostTypeDefinition = {
|
|
|
73
71
|
]
|
|
74
72
|
},
|
|
75
73
|
architecture: {
|
|
76
|
-
...
|
|
77
|
-
writable: true,
|
|
74
|
+
...string_attribute_writable,
|
|
78
75
|
values: ["x86", "x86_64", "aarch64", "armv7"]
|
|
79
76
|
},
|
|
80
|
-
replaces: { ...
|
|
81
|
-
depends: { ...
|
|
82
|
-
provides: { ...
|
|
77
|
+
replaces: { ...string_collection_attribute_writable },
|
|
78
|
+
depends: { ...string_collection_attribute_writable },
|
|
79
|
+
provides: { ...string_collection_attribute_writable },
|
|
83
80
|
extends: { type: "host", collection: true, writable: true },
|
|
84
81
|
model: string_attribute,
|
|
85
82
|
isModel: boolean_attribute_false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { hasWellKnownSubnet, normalizeIP } from "ip-utilties";
|
|
3
|
-
import {
|
|
3
|
+
import { string_attribute_writable, hostname_attribute } from "pacc";
|
|
4
4
|
import { Base, cidrAddresses } from "pmcf";
|
|
5
5
|
import {
|
|
6
6
|
networkProperties,
|
|
@@ -41,11 +41,10 @@ export const NetworkInterfaceTypeDefinition = {
|
|
|
41
41
|
|
|
42
42
|
services: { type: "service", collection: true, writable: true },
|
|
43
43
|
hostName: { ...hostname_attribute, writable: true },
|
|
44
|
-
ipAddresses: { ...
|
|
45
|
-
|
|
46
|
-
hwaddr: { ...string_attribute, writable: true },
|
|
44
|
+
ipAddresses: { ...string_attribute_writable },
|
|
45
|
+
hwaddr: { ...string_attribute_writable },
|
|
47
46
|
network: { type: "network", collection: false, writable: true },
|
|
48
|
-
destination: { ...
|
|
47
|
+
destination: { ...string_attribute_writable }
|
|
49
48
|
}
|
|
50
49
|
};
|
|
51
50
|
|
|
@@ -191,7 +190,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
191
190
|
|
|
192
191
|
if (this.name !== "eth0" && this.hwaddr) {
|
|
193
192
|
const disabled = {};
|
|
194
|
-
if(this.disabled) {
|
|
193
|
+
if (this.disabled) {
|
|
195
194
|
disabled.Unmanaged = "yes";
|
|
196
195
|
}
|
|
197
196
|
await writeLines(networkDir, `${this.name}.link`, [
|
package/src/network-support.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
string_collection_attribute_writable,
|
|
3
|
+
string_attribute_writable,
|
|
4
4
|
number_attribute_writable,
|
|
5
5
|
hostname_attribute,
|
|
6
6
|
boolean_attribute_writable
|
|
@@ -8,33 +8,30 @@ import {
|
|
|
8
8
|
|
|
9
9
|
export const networkProperties = {
|
|
10
10
|
scope: {
|
|
11
|
-
...
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// default: "global"
|
|
11
|
+
...string_attribute_writable,
|
|
12
|
+
values: ["global", "site", "link", "host"]
|
|
13
|
+
// default: "global"
|
|
15
14
|
},
|
|
16
15
|
class: {
|
|
17
|
-
...
|
|
18
|
-
writable: true,
|
|
16
|
+
...string_attribute_writable,
|
|
19
17
|
values: ["10GBASE-T", "1000BASE-T", "100BASE-T", "10BASE-T"]
|
|
20
18
|
},
|
|
21
19
|
kind: {
|
|
22
|
-
...
|
|
23
|
-
writable: true,
|
|
20
|
+
...string_attribute_writable,
|
|
24
21
|
values: ["loopback", "ethernet", "wlan", "wireguard", "fiber", "dsl"]
|
|
25
22
|
},
|
|
26
|
-
ssid: { ...
|
|
27
|
-
psk: { ...
|
|
28
|
-
metric: { ...number_attribute_writable
|
|
23
|
+
ssid: { ...string_attribute_writable },
|
|
24
|
+
psk: { ...string_attribute_writable },
|
|
25
|
+
metric: { ...number_attribute_writable /*default: 1004*/ },
|
|
29
26
|
mtu: { ...number_attribute_writable, default: 1500 },
|
|
30
27
|
gateway: { type: "host", collection: false, writable: true },
|
|
31
|
-
multicastDNS: boolean_attribute_writable
|
|
28
|
+
multicastDNS: boolean_attribute_writable
|
|
32
29
|
};
|
|
33
30
|
|
|
34
31
|
export const networkAddressProperties = {
|
|
35
32
|
hostName: { ...hostname_attribute, writable: true },
|
|
36
|
-
cidrAddresses: { ...
|
|
37
|
-
cidrAddress: { ...
|
|
38
|
-
addresses: { ...
|
|
39
|
-
address: { ...
|
|
33
|
+
cidrAddresses: { ...string_collection_attribute_writable },
|
|
34
|
+
cidrAddress: { ...string_attribute_writable },
|
|
35
|
+
addresses: { ...string_collection_attribute_writable },
|
|
36
|
+
address: { ...string_attribute_writable }
|
|
40
37
|
};
|
package/src/owner.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { normalizeCIDR, familyIP } from "ip-utilties";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
string_collection_attribute_writable,
|
|
4
4
|
string_attribute,
|
|
5
|
+
string_attribute_writable,
|
|
5
6
|
email_attribute
|
|
6
7
|
} from "pacc";
|
|
7
8
|
import { asIterator } from "./utils.mjs";
|
|
@@ -19,12 +20,12 @@ const OwnerTypeDefinition = {
|
|
|
19
20
|
hosts: { type: "host", collection: true, writable: true },
|
|
20
21
|
clusters: { type: "cluster", collection: true, writable: true },
|
|
21
22
|
subnets: { type: Subnet.typeDefinition, collection: true, writable: true },
|
|
22
|
-
country: { ...
|
|
23
|
-
domain: { ...
|
|
24
|
-
domains: { ...
|
|
25
|
-
timezone: { ...
|
|
26
|
-
architectures: { ...
|
|
27
|
-
locales: { ...
|
|
23
|
+
country: { ...string_attribute_writable },
|
|
24
|
+
domain: { ...string_attribute_writable },
|
|
25
|
+
domains: { ...string_collection_attribute_writable },
|
|
26
|
+
timezone: { ...string_attribute_writable },
|
|
27
|
+
architectures: { ...string_collection_attribute_writable },
|
|
28
|
+
locales: { ...string_collection_attribute_writable },
|
|
28
29
|
administratorEmail: { ...email_attribute, writable: true }
|
|
29
30
|
}
|
|
30
31
|
};
|
package/src/service.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
string_attribute_writable,
|
|
3
3
|
string_collection_attribute,
|
|
4
4
|
string_collection_attribute_writable,
|
|
5
5
|
number_attribute_writable,
|
|
@@ -28,11 +28,10 @@ import {
|
|
|
28
28
|
export const endpointProperties = {
|
|
29
29
|
port: { ...number_attribute_writable },
|
|
30
30
|
protocol: {
|
|
31
|
-
...
|
|
32
|
-
writable: true,
|
|
31
|
+
...string_attribute_writable,
|
|
33
32
|
values: ["tcp", "udp"]
|
|
34
33
|
},
|
|
35
|
-
type: { ...
|
|
34
|
+
type: { ...string_attribute_writable },
|
|
36
35
|
types: string_collection_attribute,
|
|
37
36
|
tls: boolean_attribute_false
|
|
38
37
|
};
|
|
@@ -65,7 +64,7 @@ export const ServiceTypeDefinition = {
|
|
|
65
64
|
properties: {
|
|
66
65
|
...networkAddressProperties,
|
|
67
66
|
...endpointProperties,
|
|
68
|
-
alias: { ...
|
|
67
|
+
alias: { ...string_attribute_writable },
|
|
69
68
|
weight: { ...number_attribute_writable /*default: 1*/ },
|
|
70
69
|
systemd: string_collection_attribute_writable
|
|
71
70
|
}
|
package/src/services/bind.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createHmac } from "node:crypto";
|
|
|
3
3
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
4
4
|
import { isLinkLocal, reverseArpa } from "ip-utilties";
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
string_attribute_writable,
|
|
7
7
|
string_collection_attribute,
|
|
8
8
|
boolean_attribute_writable_true,
|
|
9
9
|
boolean_attribute_writable_false,
|
|
@@ -53,12 +53,12 @@ const BindServiceTypeDefinition = {
|
|
|
53
53
|
},
|
|
54
54
|
exclude: { type: address_types, collection: true, writable: true },
|
|
55
55
|
notify: boolean_attribute_writable_false,
|
|
56
|
-
recordTTL: { ...
|
|
56
|
+
recordTTL: { ...string_attribute_writable },
|
|
57
57
|
serial: { ...number_attribute, writable: true },
|
|
58
|
-
refresh: { ...
|
|
59
|
-
retry: { ...
|
|
60
|
-
expire: { ...
|
|
61
|
-
minimum: { ...
|
|
58
|
+
refresh: { ...string_attribute_writable, default: 36000 },
|
|
59
|
+
retry: { ...string_attribute_writable, default: 72000 },
|
|
60
|
+
expire: { ...string_attribute_writable, default: 600000 },
|
|
61
|
+
minimum: { ...string_attribute_writable, default: 60000 },
|
|
62
62
|
allowedUpdates: { ...string_collection_attribute, writable: true }
|
|
63
63
|
},
|
|
64
64
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { string_attribute_writable } from "pacc";
|
|
2
2
|
import { Service, ServiceTypeDefinition } from "pmcf";
|
|
3
3
|
import { addType } from "../types.mjs";
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ const SystemdJournalUploadServiceTypeDefinition = {
|
|
|
9
9
|
extends: ServiceTypeDefinition,
|
|
10
10
|
priority: 0.1,
|
|
11
11
|
properties: {
|
|
12
|
-
url: { ...
|
|
12
|
+
url: { ...string_attribute_writable }
|
|
13
13
|
},
|
|
14
14
|
service: {}
|
|
15
15
|
};
|
package/types/base.d.mts
CHANGED
|
@@ -14,20 +14,7 @@ export class Base {
|
|
|
14
14
|
writable: boolean;
|
|
15
15
|
};
|
|
16
16
|
type: import("pacc").AttributeDefinition;
|
|
17
|
-
name:
|
|
18
|
-
writable: boolean;
|
|
19
|
-
type: string;
|
|
20
|
-
isKey: boolean;
|
|
21
|
-
mandatory: boolean;
|
|
22
|
-
collection: boolean;
|
|
23
|
-
private?: boolean;
|
|
24
|
-
depends?: string;
|
|
25
|
-
description?: string;
|
|
26
|
-
default?: any;
|
|
27
|
-
set?: Function;
|
|
28
|
-
get?: Function;
|
|
29
|
-
env?: string[] | string;
|
|
30
|
-
};
|
|
17
|
+
name: import("pacc").AttributeDefinition;
|
|
31
18
|
description: {
|
|
32
19
|
writable: boolean;
|
|
33
20
|
type: string;
|
|
@@ -57,20 +44,7 @@ export class Base {
|
|
|
57
44
|
get?: Function;
|
|
58
45
|
env?: string[] | string;
|
|
59
46
|
};
|
|
60
|
-
packaging:
|
|
61
|
-
writable: boolean;
|
|
62
|
-
type: string;
|
|
63
|
-
isKey: boolean;
|
|
64
|
-
mandatory: boolean;
|
|
65
|
-
collection: boolean;
|
|
66
|
-
private?: boolean;
|
|
67
|
-
depends?: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
default?: any;
|
|
70
|
-
set?: Function;
|
|
71
|
-
get?: Function;
|
|
72
|
-
env?: string[] | string;
|
|
73
|
-
};
|
|
47
|
+
packaging: import("pacc").AttributeDefinition;
|
|
74
48
|
disabled: import("pacc").AttributeDefinition;
|
|
75
49
|
tags: import("pacc").AttributeDefinition;
|
|
76
50
|
};
|