pmcf 3.7.12 → 3.8.1

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.7.12",
3
+ "version": "3.8.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -64,7 +64,7 @@
64
64
  "typescript": "^5.9.2"
65
65
  },
66
66
  "engines": {
67
- "node": ">=22.18.0"
67
+ "node": ">=22.19.0"
68
68
  },
69
69
  "repository": {
70
70
  "type": "git",
@@ -1,7 +1,7 @@
1
- import { writeFile, mkdir } from "node:fs/promises";
1
+ import { mkdir } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
3
  import { addType } from "../types.mjs";
4
- import { addHook } from "../hooks.mjs";
4
+ import { writeLines, sectionLines } from "../utils.mjs";
5
5
  import { NetworkInterfaceTypeDefinition } from "./network-interface.mjs";
6
6
  import {
7
7
  EthernetNetworkInterface,
@@ -51,8 +51,25 @@ export class WLANNetworkInterface extends EthernetNetworkInterface {
51
51
 
52
52
  async systemdDefinitions(packageData) {
53
53
  await super.systemdDefinitions(packageData);
54
- const d = join(packageData.dir, "var/lib/iwd/");
55
- await mkdir(d, { recursive: true });
54
+ await mkdir(join(packageData.dir, "var/lib/iwd/"), { recursive: true });
55
+
56
+ const secretName = "iwd-secret";
57
+
58
+ await writeLines(join(packageData.dir, "/etc/iwd"), "main.conf", [
59
+ sectionLines("General", {
60
+ SystemdEncrypt: secretName
61
+ })
62
+ ]);
63
+
64
+ await writeLines(
65
+ join(packageData.dir, "usr/lib/systemd/system/iwd.service.d/"),
66
+ "mf.conf",
67
+ [
68
+ sectionLines("Service", {
69
+ LoadCredentialEncrypted: `${secretName}:/etc/credstore.encrypted/${secretName}`
70
+ })
71
+ ]
72
+ );
56
73
 
57
74
  packageData.properties.requires.push("iwd", "impala");
58
75
  }
@@ -57,7 +57,7 @@ export class MosquittoService extends Service {
57
57
  name: `mosquitto-${this.location.name}-${host.name}`,
58
58
  description: `mosquitto definitions for ${this.fullName}@${name}`,
59
59
  access: "private",
60
- dependencies: ["mosquitto>=2.0.21"]
60
+ dependencies: ["mosquitto>=2.0.22"]
61
61
  }
62
62
  };
63
63