@kybernesis/create 0.14.1 → 0.14.2
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/dist/systemd.js +14 -1
- package/package.json +1 -1
package/dist/systemd.js
CHANGED
|
@@ -72,11 +72,24 @@ export function reconcileManageRestart(cwd, name) {
|
|
|
72
72
|
return "blocked";
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
function dropIns(dir) {
|
|
76
|
+
try {
|
|
77
|
+
return readdirSync(dir)
|
|
78
|
+
.filter((name) => name.endsWith(".conf"))
|
|
79
|
+
.sort()
|
|
80
|
+
.map((name) => readFileSync(join(dir, name), "utf8"));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
75
86
|
export function findMatchingAgentServiceUnit(cwd, systemdDir = "/etc/systemd/system") {
|
|
76
87
|
try {
|
|
77
88
|
for (const file of readdirSync(systemdDir).filter((entry) => entry.endsWith("-agent.service"))) {
|
|
78
89
|
const path = join(systemdDir, file);
|
|
79
|
-
|
|
90
|
+
// The effective unit is the file plus its drop-ins (<unit>.d/*.conf, in
|
|
91
|
+
// name order) — a build gate added through `systemctl edit` counts.
|
|
92
|
+
const contents = [readFileSync(path, "utf8"), ...dropIns(`${path}.d`)].join("\n");
|
|
80
93
|
const values = parseAgentServiceUnit(path, contents);
|
|
81
94
|
if (values && resolve(values.app) === resolve(cwd)) {
|
|
82
95
|
return { path, contents, values, mode: statSync(path).mode & 0o777 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kybernesis/create",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "The Kybernesis agent scaffolder and FDE toolkit: one command to a governed, remembering, multiplayer, self-testing eve agent — plus doctor and upgrade.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|