pmcf 4.28.1 → 4.28.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "4.28.1",
3
+ "version": "4.28.3",
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.1",
57
+ "pacc": "^9.3.2",
58
58
  "package-directory": "^8.2.0"
59
59
  },
60
60
  "devDependencies": {
package/src/cluster.mjs CHANGED
@@ -16,7 +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
19
  static key = "name";
21
20
  static attributes = {
22
21
  routerId: { ...number_attribute_writable, default: 100 },
@@ -2,10 +2,8 @@ import { default_attribute_writable, addType } from "pacc";
2
2
  import { Service } from "./service.mjs";
3
3
  import { networkAddressType } from "pmcf";
4
4
 
5
-
6
5
  export class ExtraSourceService extends Service {
7
6
  static name = "extra-source-service";
8
- static extends = Service;
9
7
  static specializationOf = Service;
10
8
  static owners = Service.owners;
11
9
  static attributes = {
@@ -16,7 +14,6 @@ export class ExtraSourceService extends Service {
16
14
  }
17
15
  };
18
16
 
19
-
20
17
  static {
21
18
  addType(this);
22
19
  }
package/src/host.mjs CHANGED
@@ -28,7 +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
31
  static key = "name";
33
32
  static attributes = {
34
33
  ...networkAddressAttributes,
package/src/location.mjs CHANGED
@@ -7,7 +7,6 @@ export class Location extends Owner {
7
7
  static name = "location";
8
8
  static priority = 2;
9
9
  static owners = [Owner, Location, "root"];
10
- static extends = Owner;
11
10
  static key = "name";
12
11
  static attributes = {};
13
12
 
@@ -3,7 +3,6 @@ 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
7
  static owners = NetworkInterface.owners;
9
8
  static key = "name";
@@ -12,7 +12,6 @@ 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
16
  static owners = NetworkInterface.owners;
18
17
  static key = "name";
@@ -6,7 +6,7 @@ import {
6
6
  hostname_attribute,
7
7
  addType
8
8
  } from "pacc";
9
- import { Base, cidrAddresses } from "pmcf";
9
+ import { Host, cidrAddresses } from "pmcf";
10
10
  import {
11
11
  networkAttributes,
12
12
  networkAddressAttributes
@@ -18,8 +18,7 @@ import { yesno } from "../utils.mjs";
18
18
 
19
19
  export class NetworkInterface extends SkeletonNetworkInterface {
20
20
  static name = "network_interface";
21
- static owners = ["host"];
22
- static extends = Base;
21
+ static owners = [Host];
23
22
  static specializations = {};
24
23
  static factoryFor(owner, value) {
25
24
  let st = this.specializations[value.kind];
@@ -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,7 +3,6 @@ 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
7
  static owners = NetworkInterface.owners;
9
8
  static key = "name";
@@ -4,7 +4,6 @@ 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
8
  static owners = NetworkInterface.owners;
10
9
  static key = "name";
@@ -11,7 +11,6 @@ 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
15
  static owners = EthernetNetworkInterface.owners;
17
16
  static key = "name";
package/src/network.mjs CHANGED
@@ -7,7 +7,6 @@ export class Network extends Owner {
7
7
  static name = "network";
8
8
  static priority = 2;
9
9
  static owners = ["location", Owner, "root"];
10
- static extends = Owner;
11
10
  static key = "name";
12
11
  static attributes = {
13
12
  ...networkAttributes,
package/src/owner.mjs CHANGED
@@ -19,7 +19,6 @@ export class Owner extends Base {
19
19
  static name = "owner";
20
20
  static priority = 2;
21
21
  static owners = ["location", Owner, "root"];
22
- static extends = Base;
23
22
  static key = "name";
24
23
  static attributes = {
25
24
  networks: networks_attribute,
@@ -5,7 +5,6 @@ export class ServiceOwner extends Base {
5
5
  static name = "service-owner";
6
6
  static priority = 1.9;
7
7
  static owners = ["owner", "network", "root"];
8
- static extends = Base;
9
8
  static key = "name";
10
9
  static attributes = {
11
10
  services: {
package/src/service.mjs CHANGED
@@ -44,7 +44,6 @@ export class Service extends Base {
44
44
  static name = "service";
45
45
  static priority = 1.1;
46
46
  static owners = [Host, "cluster", "network_interface"];
47
- static extends = Base;
48
47
  static specializations = {};
49
48
  static factoryFor(owner, value) {
50
49
  const type = value.type ?? value.name;
@@ -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 extends = Base;
13
12
  static key = "name";
14
13
  static attributes = {
15
14
  name: name_attribute_writable,
@@ -25,7 +24,6 @@ class alpm_repository extends Base {
25
24
  export class ALPMService extends Service {
26
25
  static name = "alpm";
27
26
  static priority = 1;
28
- static extends = Service;
29
27
  static specializationOf = Service;
30
28
  static owners = Service.owners;
31
29
  static attributes = {
@@ -398,7 +398,6 @@ function addressesStatement(prefix, objects, generateEmpty = false) {
398
398
 
399
399
  export class BindService extends ExtraSourceService {
400
400
  static name = "bind";
401
- static extends = ExtraSourceService;
402
401
  static specializationOf = Service;
403
402
  static owners = Service.owners;
404
403
  static key = "name";
@@ -9,7 +9,6 @@ import { writeLines } from "../utils.mjs";
9
9
  export class ChronyService extends ExtraSourceService {
10
10
  static name = "chrony";
11
11
  static priority = 1;
12
- static extends = ExtraSourceService;
13
12
  static specializationOf = Service;
14
13
  static owners = Service.owners;
15
14
  static key = "name";
@@ -5,7 +5,6 @@ import { Service } from "../service.mjs";
5
5
  export class HeadscaleService extends Service {
6
6
  static name = "headscale";
7
7
  static priority = 1;
8
- static extends = Service;
9
8
  static specializationOf = Service;
10
9
  static owners = Service.owners;
11
10
  static key = "name";
@@ -12,7 +12,6 @@ import { Service } from "../service.mjs";
12
12
  export class InfluxdbService extends Service {
13
13
  static name = "influxdb";
14
14
  static priority = 1;
15
- static extends = Service;
16
15
  static specializationOf = Service;
17
16
  static owners = Service.owners;
18
17
  static key = "name";
@@ -22,7 +22,6 @@ const keaVersion = "3.0.1";
22
22
  export class KeaService extends Service {
23
23
  static name = "kea";
24
24
  static priority = 1;
25
- static extends = Service;
26
25
  static specializationOf = Service;
27
26
  static owners = Service.owners;
28
27
  static key = "name";
@@ -5,7 +5,6 @@ import { Service } from "../service.mjs";
5
5
  export class MosquittoService extends Service {
6
6
  static name = "mosquitto";
7
7
  static priority = 1;
8
- static extends = Service;
9
8
  static specializationOf = Service;
10
9
  static owners = Service.owners;
11
10
  static key = "name";
@@ -5,7 +5,6 @@ import { Service } from "../service.mjs";
5
5
  export class OpenLDAPService extends Service {
6
6
  static name = "openldap";
7
7
  static priority = 1;
8
- static extends = Service;
9
8
  static specializationOf = Service;
10
9
  static owners = Service.owners;
11
10
  static key = "name";
@@ -52,6 +51,8 @@ export class OpenLDAPService extends Service {
52
51
 
53
52
  const packageData = this.packageData;
54
53
 
54
+ console.log([...this.walkDirections(["this", "extends"]) ].map(n=>n.fullName));
55
+
55
56
  packageData.sources = await Array.fromAsync(
56
57
  this.templateContent(
57
58
  {
@@ -5,7 +5,6 @@ import { Service } from "../service.mjs";
5
5
  export class PostfixService extends Service {
6
6
  static name = "postfix";
7
7
  static priority = 1;
8
- static extends = Service;
9
8
  static specializationOf = Service;
10
9
  static owners = Service.owners;
11
10
  static key = "name";
@@ -15,7 +15,6 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
15
15
  export class SystemdJournalRemoteService extends Service {
16
16
  static name = "systemd-journal-remote";
17
17
  static priority = 1;
18
- static extends = Service;
19
18
  static specializationOf = Service;
20
19
  static owners = Service.owners;
21
20
  static key = "name";
@@ -15,7 +15,6 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
15
15
  export class SystemdJournalUploadService extends Service {
16
16
  static name = "systemd-journal-upload";
17
17
  static priority = 1;
18
- static extends = Service;
19
18
  static specializationOf = Service;
20
19
  static owners = Service.owners;
21
20
  static key = "name";
@@ -9,7 +9,6 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
9
9
  export class SystemdJournaldService extends Service {
10
10
  static name = "systemd-journald";
11
11
  static priority = 1;
12
- static extends = Service;
13
12
  static specializationOf = Service;
14
13
  static owners = Service.owners;
15
14
  static key = "name";
@@ -22,7 +22,6 @@ import {
22
22
  export class SystemdResolvedService extends ExtraSourceService {
23
23
  static name = "systemd-resolved";
24
24
  static priority = 1;
25
- static extends = ExtraSourceService;
26
25
  static specializationOf = Service;
27
26
  static owners = Service.owners;
28
27
  static key = "name";
@@ -14,7 +14,6 @@ import { filterConfigurable, sectionLines } from "../utils.mjs";
14
14
  export class SystemdTimesyncdService extends ExtraSourceService {
15
15
  static name = "systemd-timesyncd";
16
16
  static priority = 1;
17
- static extends = ExtraSourceService;
18
17
  static specializationOf = Service;
19
18
  static owners = Service.owners;
20
19
 
@@ -4,7 +4,6 @@ import { Service } from "../service.mjs";
4
4
  export class TailscaleService extends Service {
5
5
  static name = "tailscale";
6
6
  static priority = 1;
7
- static extends = Service;
8
7
  static specializationOf = Service;
9
8
  static owners = Service.owners;
10
9
  static key = "name";