pmcf 4.28.5 → 4.28.7

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.5",
3
+ "version": "4.28.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,7 +1,7 @@
1
1
  import { join } from "node:path";
2
2
  import { AggregatedMap } from "aggregated-map";
3
3
  import { addType } from "pacc";
4
- import { writeLines, sectionLines } from "../utils.mjs";
4
+ import { writeLines, sectionLines, asArray } from "../utils.mjs";
5
5
  import { NetworkAddress, Host, cidrAddresses } from "pmcf";
6
6
  import { ServiceOwner } from "../service-owner.mjs";
7
7
 
@@ -35,11 +35,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
35
35
  }
36
36
 
37
37
  get hosts() {
38
- const host = this.host;
39
- if (host) {
40
- return [host];
41
- }
42
- return [];
38
+ return asArray(this.host);
43
39
  }
44
40
 
45
41
  get network_interface() {
@@ -20,8 +20,7 @@ class alpm_repository extends Base {
20
20
  }
21
21
  }
22
22
 
23
- export class ALPMService extends Service {
24
- static name = "alpm";
23
+ export class alpm extends Service {
25
24
  static specializationOf = Service;
26
25
  static attributes = {
27
26
  repositories: {
@@ -43,7 +42,7 @@ export class ALPMService extends Service {
43
42
  repositories = new Map();
44
43
 
45
44
  typeNamed(type, name) {
46
- if (type === ALPMService.name) {
45
+ if (type === alpm.name) {
47
46
  return this.repositories.get(name);
48
47
  }
49
48
 
@@ -395,8 +395,7 @@ function addressesStatement(prefix, objects, generateEmpty = false) {
395
395
  return [];
396
396
  }
397
397
 
398
- export class BindService extends ExtraSourceService {
399
- static name = "bind";
398
+ export class bind extends ExtraSourceService {
400
399
  static specializationOf = Service;
401
400
  static attributes = {
402
401
  groups: {
@@ -6,8 +6,7 @@ import { addServiceType, ExtraSourceService } from "pmcf";
6
6
  import { Service, serviceEndpoints } from "../service.mjs";
7
7
  import { writeLines } from "../utils.mjs";
8
8
 
9
- export class ChronyService extends ExtraSourceService {
10
- static name = "chrony";
9
+ export class chrony extends ExtraSourceService {
11
10
  static specializationOf = Service;
12
11
  static service = {
13
12
  systemdService: "chronyd.service",
@@ -2,8 +2,7 @@ import { addType } from "pacc";
2
2
  import { addServiceType } from "pmcf";
3
3
  import { Service } from "../service.mjs";
4
4
 
5
- export class HeadscaleService extends Service {
6
- static name = "headscale";
5
+ export class headscale extends Service {
7
6
  static specializationOf = Service;
8
7
  static service = {
9
8
  endpoints: [
@@ -9,8 +9,7 @@ import {
9
9
  } from "../utils.mjs";
10
10
  import { Service } from "../service.mjs";
11
11
 
12
- export class InfluxdbService extends Service {
13
- static name = "influxdb";
12
+ export class influxdb extends Service {
14
13
  static specializationOf = Service;
15
14
  static attributes = {
16
15
  metricsDisabled: {
@@ -2,8 +2,7 @@ import { port_attribute, string_attribute_writable, addType } from "pacc";
2
2
  import { addServiceType } from "pmcf";
3
3
  import { Service } from "../service.mjs";
4
4
 
5
- export class MosquittoService extends Service {
6
- static name = "mosquitto";
5
+ export class mosquitto extends Service {
7
6
  static specializationOf = Service;
8
7
  static attributes = {
9
8
  listener: {
@@ -2,8 +2,7 @@ import { string_attribute_writable, addType } from "pacc";
2
2
  import { addServiceType } from "pmcf";
3
3
  import { Service } from "../service.mjs";
4
4
 
5
- export class OpenLDAPService extends Service {
6
- static name = "openldap";
5
+ export class openldap extends Service {
7
6
  static specializationOf = Service;
8
7
  static attributes = {
9
8
  base: string_attribute_writable,
@@ -2,8 +2,7 @@ import { addType } from "pacc";
2
2
  import { addServiceType } from "pmcf";
3
3
  import { Service } from "../service.mjs";
4
4
 
5
- export class PostfixService extends Service {
6
- static name = "postfix";
5
+ export class postfix extends Service {
7
6
  static specializationOf = Service;
8
7
  static attributes = {};
9
8
  static service = {
@@ -1,8 +1,7 @@
1
1
  import { addType } from "pacc";
2
2
  import { Service } from "../service.mjs";
3
3
 
4
- export class TailscaleService extends Service {
5
- static name = "tailscale";
4
+ export class tailscale extends Service {
6
5
  static specializationOf = Service;
7
6
  static service = {
8
7
  endpoints: [