pmcf 3.22.0 → 4.0.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "3.22.0",
3
+ "version": "4.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/module.mjs CHANGED
@@ -27,7 +27,7 @@ export * from "./services/influxdb.mjs";
27
27
  export * from "./services/mosquitto.mjs";
28
28
  export * from "./services/headscale.mjs";
29
29
  export * from "./services/tailscale.mjs";
30
- export * from "./services/systemd-journal.mjs";
30
+ export * from "./services/systemd-journald.mjs";
31
31
  export * from "./services/systemd-journal-remote.mjs";
32
32
  export * from "./services/systemd-journal-upload.mjs";
33
33
  export * from "./services/systemd-timesyncd.mjs";
@@ -105,12 +105,10 @@ export class SystemdJournalRemoteService extends Service {
105
105
  * @returns {Object}
106
106
  */
107
107
  systemdConfigs(name) {
108
- return [
109
- {
110
- serviceName: "systemd-journal-remote.service",
111
- configFileName: `etc/systemd/journal-remote.conf.d/${name}.conf`,
112
- content: ["Remote", this.getProperties(filterConfigurable)]
113
- }
114
- ];
108
+ return {
109
+ serviceName: `${this.type}.service`,
110
+ configFileName: `etc/systemd/journal-remote.conf.d/${name}.conf`,
111
+ content: ["Remote", this.getProperties(filterConfigurable)]
112
+ };
115
113
  }
116
114
  }
@@ -73,7 +73,7 @@ export class SystemdJournalUploadService extends Service {
73
73
  */
74
74
  systemdConfigs(name) {
75
75
  return {
76
- serviceName: "systemd-journal-upload.service",
76
+ serviceName: `${this.type}.service`,
77
77
  configFileName: `etc/systemd/journal-upload.conf.d/${name}.conf`,
78
78
  content: ["Upload", this.getProperties(filterConfigurable)]
79
79
  };
@@ -7,7 +7,7 @@ import { Service, ServiceTypeDefinition, addServiceType } from "pmcf";
7
7
  import { filterConfigurable } from "../utils.mjs";
8
8
 
9
9
  const SystemdJournalServiceTypeDefinition = {
10
- name: "systemd-journal",
10
+ name: "systemd-journald",
11
11
  extends: ServiceTypeDefinition,
12
12
  specializationOf: ServiceTypeDefinition,
13
13
  owners: ServiceTypeDefinition.owners,
@@ -109,7 +109,7 @@ const SystemdJournalServiceTypeDefinition = {
109
109
  service: {}
110
110
  };
111
111
 
112
- export class SystemdJournalService extends Service {
112
+ export class SystemdJournaldService extends Service {
113
113
  static {
114
114
  addType(this);
115
115
  addServiceType(this.typeDefinition.service, this.typeDefinition.name);
@@ -129,7 +129,7 @@ export class SystemdJournalService extends Service {
129
129
 
130
130
  systemdConfigs(name) {
131
131
  return {
132
- serviceName: "systemd-journald.service",
132
+ serviceName: `${this.type}.service`,
133
133
  configFileName: `etc/systemd/journal.conf.d/${name}.conf`,
134
134
  content: ["Journal", this.getProperties(filterConfigurable)]
135
135
  };
@@ -76,7 +76,7 @@ export class SystemdResolvedService extends ExtraSourceService {
76
76
  };
77
77
 
78
78
  return {
79
- serviceName: "systemd-resolved.service",
79
+ serviceName: `${this.type}.service`,
80
80
  configFileName: `etc/systemd/resolved.conf.d/${name}.conf`,
81
81
  content: [
82
82
  "Resolve",
@@ -19,13 +19,13 @@ const SystemdTimesyncdServiceTypeDefinition = {
19
19
  owners: ServiceTypeDefinition.owners,
20
20
 
21
21
  attributes: {
22
- NTP: {...string_attribute_writable, configurable: true },
23
- FallbackNTP: {...string_attribute_writable, configurable: true },
24
- RootDistanceMaxSec: {...duration_attribute_writable, configurable: true },
25
- PollIntervalMinSec: {...duration_attribute_writable, configurable: true },
26
- PollIntervalMaxSec: {...duration_attribute_writable, configurable: true },
27
- ConnectionRetrySec: {...duration_attribute_writable, configurable: true },
28
- SaveIntervalSec: {...duration_attribute_writable, configurable: true }
22
+ NTP: { ...string_attribute_writable, configurable: true },
23
+ FallbackNTP: { ...string_attribute_writable, configurable: true },
24
+ RootDistanceMaxSec: { ...duration_attribute_writable, configurable: true },
25
+ PollIntervalMinSec: { ...duration_attribute_writable, configurable: true },
26
+ PollIntervalMaxSec: { ...duration_attribute_writable, configurable: true },
27
+ ConnectionRetrySec: { ...duration_attribute_writable, configurable: true },
28
+ SaveIntervalSec: { ...duration_attribute_writable, configurable: true }
29
29
  },
30
30
  service: {}
31
31
  };
@@ -61,7 +61,7 @@ export class SystemdTimesyncdService extends ExtraSourceService {
61
61
  };
62
62
 
63
63
  return {
64
- serviceName: "systemd-timesyncd.service",
64
+ serviceName: `${this.type}.service`,
65
65
  configFileName: `etc/systemd/timesyncd.conf.d/${name}.conf`,
66
66
  content: [
67
67
  "Time",
@@ -27,7 +27,7 @@ export * from "./services/influxdb.mjs";
27
27
  export * from "./services/mosquitto.mjs";
28
28
  export * from "./services/headscale.mjs";
29
29
  export * from "./services/tailscale.mjs";
30
- export * from "./services/systemd-journal.mjs";
30
+ export * from "./services/systemd-journald.mjs";
31
31
  export * from "./services/systemd-journal-remote.mjs";
32
32
  export * from "./services/systemd-journal-upload.mjs";
33
33
  export * from "./services/systemd-timesyncd.mjs";
@@ -1,4 +1,4 @@
1
- export class SystemdJournalService extends Service {
1
+ export class SystemdJournaldService extends Service {
2
2
  static get typeDefinition(): {
3
3
  name: string;
4
4
  extends: {