pmcf 4.28.2 → 4.28.4
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/cluster.mjs +0 -2
- package/src/extra-source-service.mjs +0 -2
- package/src/host.mjs +0 -2
- package/src/location.mjs +0 -3
- package/src/network-interfaces/ethernet.mjs +0 -3
- package/src/network-interfaces/loopback.mjs +0 -3
- package/src/network-interfaces/skeleton.mjs +6 -0
- package/src/network-interfaces/tun.mjs +0 -3
- package/src/network-interfaces/wireguard.mjs +0 -4
- package/src/network-interfaces/wlan.mjs +0 -3
- package/src/network.mjs +0 -3
- package/src/owner.mjs +1 -2
- package/src/service-owner.mjs +0 -1
- package/src/services/alpm.mjs +0 -4
- package/src/services/bind.mjs +0 -4
- package/src/services/chrony.mjs +0 -4
- package/src/services/headscale.mjs +0 -4
- package/src/services/influxdb.mjs +0 -4
- package/src/services/kea.mjs +0 -4
- package/src/services/mosquitto.mjs +0 -4
- package/src/services/openldap.mjs +2 -4
- package/src/services/postfix.mjs +0 -4
- package/src/services/systemd-journal-remote.mjs +0 -4
- package/src/services/systemd-journal-upload.mjs +0 -4
- package/src/services/systemd-journald.mjs +0 -4
- package/src/services/systemd-resolved.mjs +0 -4
- package/src/services/systemd-timesyncd.mjs +0 -3
- package/src/services/tailscale.mjs +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "4.28.
|
|
3
|
+
"version": "4.28.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"content-entry-transform": "^1.6.9",
|
|
55
55
|
"ip-utilties": "^3.0.4",
|
|
56
56
|
"npm-pkgbuild": "^20.7.3",
|
|
57
|
-
"pacc": "^9.3.
|
|
57
|
+
"pacc": "^9.3.2",
|
|
58
58
|
"package-directory": "^8.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
package/src/cluster.mjs
CHANGED
|
@@ -16,8 +16,6 @@ export class Cluster extends Host {
|
|
|
16
16
|
static name = "cluster";
|
|
17
17
|
static priority = 1.5;
|
|
18
18
|
static owners = [Owner, "network", "location", "root"];
|
|
19
|
-
static extends = Host;
|
|
20
|
-
static key = "name";
|
|
21
19
|
static attributes = {
|
|
22
20
|
routerId: { ...number_attribute_writable, default: 100 },
|
|
23
21
|
masters: {
|
|
@@ -4,9 +4,7 @@ import { networkAddressType } from "pmcf";
|
|
|
4
4
|
|
|
5
5
|
export class ExtraSourceService extends Service {
|
|
6
6
|
static name = "extra-source-service";
|
|
7
|
-
static extends = Service;
|
|
8
7
|
static specializationOf = Service;
|
|
9
|
-
static owners = Service.owners;
|
|
10
8
|
static attributes = {
|
|
11
9
|
source: {
|
|
12
10
|
...default_attribute_writable,
|
package/src/host.mjs
CHANGED
|
@@ -28,8 +28,6 @@ export class Host extends ServiceOwner {
|
|
|
28
28
|
static name = "host";
|
|
29
29
|
static priority = 1.9;
|
|
30
30
|
static owners = ["owner", "network", "root"];
|
|
31
|
-
static extends = ServiceOwner;
|
|
32
|
-
static key = "name";
|
|
33
31
|
static attributes = {
|
|
34
32
|
...networkAddressAttributes,
|
|
35
33
|
networkInterfaces: {
|
package/src/location.mjs
CHANGED
|
@@ -5,10 +5,7 @@ import { loadHooks } from "./hooks.mjs";
|
|
|
5
5
|
|
|
6
6
|
export class Location extends Owner {
|
|
7
7
|
static name = "location";
|
|
8
|
-
static priority = 2;
|
|
9
8
|
static owners = [Owner, Location, "root"];
|
|
10
|
-
static extends = Owner;
|
|
11
|
-
static key = "name";
|
|
12
9
|
static attributes = {};
|
|
13
10
|
|
|
14
11
|
static {
|
|
@@ -3,10 +3,7 @@ import { NetworkInterface } from "./network-interface.mjs";
|
|
|
3
3
|
|
|
4
4
|
export class EthernetNetworkInterface extends NetworkInterface {
|
|
5
5
|
static name = "ethernet";
|
|
6
|
-
static extends = NetworkInterface;
|
|
7
6
|
static specializationOf = NetworkInterface;
|
|
8
|
-
static owners = NetworkInterface.owners;
|
|
9
|
-
static key = "name";
|
|
10
7
|
static attributes = {
|
|
11
8
|
arpbridge: {
|
|
12
9
|
...default_attribute_writable,
|
|
@@ -12,10 +12,7 @@ const _localDomains = new Set(["localhost"]);
|
|
|
12
12
|
|
|
13
13
|
export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
14
14
|
static name = "loopback";
|
|
15
|
-
static extends = NetworkInterface;
|
|
16
15
|
static specializationOf = NetworkInterface;
|
|
17
|
-
static owners = NetworkInterface.owners;
|
|
18
|
-
static key = "name";
|
|
19
16
|
|
|
20
17
|
static {
|
|
21
18
|
addType(this);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import { AggregatedMap } from "aggregated-map";
|
|
3
|
+
import { addType } from "pacc";
|
|
3
4
|
import { writeLines, sectionLines } from "../utils.mjs";
|
|
4
5
|
import { NetworkAddress, Host, cidrAddresses } from "pmcf";
|
|
5
6
|
import { ServiceOwner } from "../service-owner.mjs";
|
|
@@ -8,10 +9,15 @@ import { ServiceOwner } from "../service-owner.mjs";
|
|
|
8
9
|
*
|
|
9
10
|
*/
|
|
10
11
|
export class SkeletonNetworkInterface extends ServiceOwner {
|
|
12
|
+
|
|
11
13
|
static get typeName() {
|
|
12
14
|
return "network_interface";
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
static {
|
|
18
|
+
addType(this);
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
_network;
|
|
16
22
|
|
|
17
23
|
get typeName() {
|
|
@@ -3,10 +3,7 @@ import { NetworkInterface } from "./network-interface.mjs";
|
|
|
3
3
|
|
|
4
4
|
export class TUNNetworkInterface extends NetworkInterface {
|
|
5
5
|
static name = "tun";
|
|
6
|
-
static extends = NetworkInterface;
|
|
7
6
|
static specializationOf = NetworkInterface;
|
|
8
|
-
static owners = NetworkInterface.owners;
|
|
9
|
-
static key = "name";
|
|
10
7
|
|
|
11
8
|
static {
|
|
12
9
|
addType(this);
|
|
@@ -4,11 +4,7 @@ import { NetworkInterface } from "./network-interface.mjs";
|
|
|
4
4
|
|
|
5
5
|
export class WireguardNetworkInterface extends SkeletonNetworkInterface {
|
|
6
6
|
static name = "wireguard";
|
|
7
|
-
static extends = NetworkInterface;
|
|
8
7
|
static specializationOf = NetworkInterface;
|
|
9
|
-
static owners = NetworkInterface.owners;
|
|
10
|
-
static key = "name";
|
|
11
|
-
|
|
12
8
|
|
|
13
9
|
static {
|
|
14
10
|
addType(this);
|
|
@@ -11,10 +11,7 @@ import { EthernetNetworkInterface } from "./ethernet.mjs";
|
|
|
11
11
|
|
|
12
12
|
export class WLANNetworkInterface extends EthernetNetworkInterface {
|
|
13
13
|
static name = "wlan";
|
|
14
|
-
static extends = EthernetNetworkInterface;
|
|
15
14
|
static specializationOf = NetworkInterface;
|
|
16
|
-
static owners = EthernetNetworkInterface.owners;
|
|
17
|
-
static key = "name";
|
|
18
15
|
static attributes = {
|
|
19
16
|
ssid: string_attribute_writable,
|
|
20
17
|
psk: secret_attribute_writable,
|
package/src/network.mjs
CHANGED
|
@@ -5,10 +5,7 @@ import { networkAttributes } from "./network-support.mjs";
|
|
|
5
5
|
|
|
6
6
|
export class Network extends Owner {
|
|
7
7
|
static name = "network";
|
|
8
|
-
static priority = 2;
|
|
9
8
|
static owners = ["location", Owner, "root"];
|
|
10
|
-
static extends = Owner;
|
|
11
|
-
static key = "name";
|
|
12
9
|
static attributes = {
|
|
13
10
|
...networkAttributes,
|
|
14
11
|
bridge: {
|
package/src/owner.mjs
CHANGED
|
@@ -18,8 +18,7 @@ const EMPTY = new Map();
|
|
|
18
18
|
export class Owner extends Base {
|
|
19
19
|
static name = "owner";
|
|
20
20
|
static priority = 2;
|
|
21
|
-
static owners = ["location",
|
|
22
|
-
static key = "name";
|
|
21
|
+
static owners = [Owner, "location", "root"];
|
|
23
22
|
static attributes = {
|
|
24
23
|
networks: networks_attribute,
|
|
25
24
|
hosts: {
|
package/src/service-owner.mjs
CHANGED
package/src/services/alpm.mjs
CHANGED
|
@@ -9,7 +9,6 @@ import { addServiceType, Base } from "pmcf";
|
|
|
9
9
|
import { Service } from "../service.mjs";
|
|
10
10
|
|
|
11
11
|
class alpm_repository extends Base {
|
|
12
|
-
static key = "name";
|
|
13
12
|
static attributes = {
|
|
14
13
|
name: name_attribute_writable,
|
|
15
14
|
base: string_attribute_writable,
|
|
@@ -23,10 +22,7 @@ class alpm_repository extends Base {
|
|
|
23
22
|
|
|
24
23
|
export class ALPMService extends Service {
|
|
25
24
|
static name = "alpm";
|
|
26
|
-
static priority = 1;
|
|
27
|
-
static extends = Service;
|
|
28
25
|
static specializationOf = Service;
|
|
29
|
-
static owners = Service.owners;
|
|
30
26
|
static attributes = {
|
|
31
27
|
repositories: {
|
|
32
28
|
...default_attribute_writable,
|
package/src/services/bind.mjs
CHANGED
|
@@ -34,7 +34,6 @@ const bindNetworkAddressTypes = networkAddressType + "|bind_group";
|
|
|
34
34
|
|
|
35
35
|
class bind_group extends Base {
|
|
36
36
|
static priority = 1;
|
|
37
|
-
static key = "name";
|
|
38
37
|
static attributes = {
|
|
39
38
|
name: name_attribute_writable,
|
|
40
39
|
access: {
|
|
@@ -398,10 +397,7 @@ function addressesStatement(prefix, objects, generateEmpty = false) {
|
|
|
398
397
|
|
|
399
398
|
export class BindService extends ExtraSourceService {
|
|
400
399
|
static name = "bind";
|
|
401
|
-
static extends = ExtraSourceService;
|
|
402
400
|
static specializationOf = Service;
|
|
403
|
-
static owners = Service.owners;
|
|
404
|
-
static key = "name";
|
|
405
401
|
static attributes = {
|
|
406
402
|
groups: {
|
|
407
403
|
...default_attribute_writable,
|
package/src/services/chrony.mjs
CHANGED
|
@@ -8,11 +8,7 @@ import { writeLines } from "../utils.mjs";
|
|
|
8
8
|
|
|
9
9
|
export class ChronyService extends ExtraSourceService {
|
|
10
10
|
static name = "chrony";
|
|
11
|
-
static priority = 1;
|
|
12
|
-
static extends = ExtraSourceService;
|
|
13
11
|
static specializationOf = Service;
|
|
14
|
-
static owners = Service.owners;
|
|
15
|
-
static key = "name";
|
|
16
12
|
static service = {
|
|
17
13
|
systemdService: "chronyd.service",
|
|
18
14
|
extends: ["ntp"],
|
|
@@ -4,11 +4,7 @@ import { Service } from "../service.mjs";
|
|
|
4
4
|
|
|
5
5
|
export class HeadscaleService extends Service {
|
|
6
6
|
static name = "headscale";
|
|
7
|
-
static priority = 1;
|
|
8
|
-
static extends = Service;
|
|
9
7
|
static specializationOf = Service;
|
|
10
|
-
static owners = Service.owners;
|
|
11
|
-
static key = "name";
|
|
12
8
|
static service = {
|
|
13
9
|
endpoints: [
|
|
14
10
|
{
|
|
@@ -11,11 +11,7 @@ import { Service } from "../service.mjs";
|
|
|
11
11
|
|
|
12
12
|
export class InfluxdbService extends Service {
|
|
13
13
|
static name = "influxdb";
|
|
14
|
-
static priority = 1;
|
|
15
|
-
static extends = Service;
|
|
16
14
|
static specializationOf = Service;
|
|
17
|
-
static owners = Service.owners;
|
|
18
|
-
static key = "name";
|
|
19
15
|
static attributes = {
|
|
20
16
|
metricsDisabled: {
|
|
21
17
|
externalName: "metrics-disabled",
|
package/src/services/kea.mjs
CHANGED
|
@@ -21,11 +21,7 @@ const keaVersion = "3.0.1";
|
|
|
21
21
|
|
|
22
22
|
export class KeaService extends Service {
|
|
23
23
|
static name = "kea";
|
|
24
|
-
static priority = 1;
|
|
25
|
-
static extends = Service;
|
|
26
24
|
static specializationOf = Service;
|
|
27
|
-
static owners = Service.owners;
|
|
28
|
-
static key = "name";
|
|
29
25
|
static attributes = {
|
|
30
26
|
"ddns-send-updates": {
|
|
31
27
|
...boolean_attribute_writable_true,
|
|
@@ -4,11 +4,7 @@ import { Service } from "../service.mjs";
|
|
|
4
4
|
|
|
5
5
|
export class MosquittoService extends Service {
|
|
6
6
|
static name = "mosquitto";
|
|
7
|
-
static priority = 1;
|
|
8
|
-
static extends = Service;
|
|
9
7
|
static specializationOf = Service;
|
|
10
|
-
static owners = Service.owners;
|
|
11
|
-
static key = "name";
|
|
12
8
|
static attributes = {
|
|
13
9
|
listener: {
|
|
14
10
|
...port_attribute,
|
|
@@ -4,11 +4,7 @@ import { Service } from "../service.mjs";
|
|
|
4
4
|
|
|
5
5
|
export class OpenLDAPService extends Service {
|
|
6
6
|
static name = "openldap";
|
|
7
|
-
static priority = 1;
|
|
8
|
-
static extends = Service;
|
|
9
7
|
static specializationOf = Service;
|
|
10
|
-
static owners = Service.owners;
|
|
11
|
-
static key = "name";
|
|
12
8
|
static attributes = {
|
|
13
9
|
base: string_attribute_writable,
|
|
14
10
|
uri: string_attribute_writable
|
|
@@ -52,6 +48,8 @@ export class OpenLDAPService extends Service {
|
|
|
52
48
|
|
|
53
49
|
const packageData = this.packageData;
|
|
54
50
|
|
|
51
|
+
console.log([...this.walkDirections(["this", "extends"]) ].map(n=>n.fullName));
|
|
52
|
+
|
|
55
53
|
packageData.sources = await Array.fromAsync(
|
|
56
54
|
this.templateContent(
|
|
57
55
|
{
|
package/src/services/postfix.mjs
CHANGED
|
@@ -4,11 +4,7 @@ import { Service } from "../service.mjs";
|
|
|
4
4
|
|
|
5
5
|
export class PostfixService extends Service {
|
|
6
6
|
static name = "postfix";
|
|
7
|
-
static priority = 1;
|
|
8
|
-
static extends = Service;
|
|
9
7
|
static specializationOf = Service;
|
|
10
|
-
static owners = Service.owners;
|
|
11
|
-
static key = "name";
|
|
12
8
|
static attributes = {};
|
|
13
9
|
static service = {
|
|
14
10
|
systemdService: "postfix.service",
|
|
@@ -14,11 +14,7 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
|
14
14
|
*/
|
|
15
15
|
export class SystemdJournalRemoteService extends Service {
|
|
16
16
|
static name = "systemd-journal-remote";
|
|
17
|
-
static priority = 1;
|
|
18
|
-
static extends = Service;
|
|
19
17
|
static specializationOf = Service;
|
|
20
|
-
static owners = Service.owners;
|
|
21
|
-
static key = "name";
|
|
22
18
|
static attributes = {
|
|
23
19
|
Seal: {
|
|
24
20
|
...boolean_attribute_writable,
|
|
@@ -14,11 +14,7 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
|
14
14
|
*/
|
|
15
15
|
export class SystemdJournalUploadService extends Service {
|
|
16
16
|
static name = "systemd-journal-upload";
|
|
17
|
-
static priority = 1;
|
|
18
|
-
static extends = Service;
|
|
19
17
|
static specializationOf = Service;
|
|
20
|
-
static owners = Service.owners;
|
|
21
|
-
static key = "name";
|
|
22
18
|
static attributes = {
|
|
23
19
|
URL: { ...string_attribute_writable, configurable: true },
|
|
24
20
|
ServerKeyFile: {
|
|
@@ -8,11 +8,7 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
|
8
8
|
|
|
9
9
|
export class SystemdJournaldService extends Service {
|
|
10
10
|
static name = "systemd-journald";
|
|
11
|
-
static priority = 1;
|
|
12
|
-
static extends = Service;
|
|
13
11
|
static specializationOf = Service;
|
|
14
|
-
static owners = Service.owners;
|
|
15
|
-
static key = "name";
|
|
16
12
|
static attributes = {
|
|
17
13
|
Storage: {
|
|
18
14
|
...string_attribute_writable,
|
|
@@ -21,11 +21,7 @@ import {
|
|
|
21
21
|
|
|
22
22
|
export class SystemdResolvedService extends ExtraSourceService {
|
|
23
23
|
static name = "systemd-resolved";
|
|
24
|
-
static priority = 1;
|
|
25
|
-
static extends = ExtraSourceService;
|
|
26
24
|
static specializationOf = Service;
|
|
27
|
-
static owners = Service.owners;
|
|
28
|
-
static key = "name";
|
|
29
25
|
static attributes = {
|
|
30
26
|
/* Resolve: {
|
|
31
27
|
...object_attribute,
|
|
@@ -13,10 +13,7 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
|
|
|
13
13
|
|
|
14
14
|
export class SystemdTimesyncdService extends ExtraSourceService {
|
|
15
15
|
static name = "systemd-timesyncd";
|
|
16
|
-
static priority = 1;
|
|
17
|
-
static extends = ExtraSourceService;
|
|
18
16
|
static specializationOf = Service;
|
|
19
|
-
static owners = Service.owners;
|
|
20
17
|
|
|
21
18
|
static attributes = {
|
|
22
19
|
NTP: { ...string_attribute_writable, configurable: true },
|
|
@@ -3,11 +3,7 @@ import { Service } from "../service.mjs";
|
|
|
3
3
|
|
|
4
4
|
export class TailscaleService extends Service {
|
|
5
5
|
static name = "tailscale";
|
|
6
|
-
static priority = 1;
|
|
7
|
-
static extends = Service;
|
|
8
6
|
static specializationOf = Service;
|
|
9
|
-
static owners = Service.owners;
|
|
10
|
-
static key = "name";
|
|
11
7
|
static service = {
|
|
12
8
|
endpoints: [
|
|
13
9
|
{
|