u-foo 2.4.0 → 2.4.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
|
@@ -112,6 +112,7 @@ async function withCapturedConsole(capture, fn) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
function createCommandExecutor(options = {}) {
|
|
115
|
+
const hasRestartDaemon = typeof options.restartDaemon === "function";
|
|
115
116
|
const {
|
|
116
117
|
projectRoot,
|
|
117
118
|
getActiveProjectRoot = () => projectRoot,
|
|
@@ -255,6 +256,18 @@ function createCommandExecutor(options = {}) {
|
|
|
255
256
|
}
|
|
256
257
|
|
|
257
258
|
if (subcommand === "restart") {
|
|
259
|
+
if (hasRestartDaemon) {
|
|
260
|
+
statusMsg("{gray-fg}⚙{/gray-fg} Restarting daemon...");
|
|
261
|
+
await restartDaemon(targetRoot);
|
|
262
|
+
await sleep(500);
|
|
263
|
+
if (isDaemonRunning(targetRoot)) {
|
|
264
|
+
statusMsg("{gray-fg}✓{/gray-fg} Daemon restarted");
|
|
265
|
+
} else {
|
|
266
|
+
statusMsg("{gray-fg}✗{/gray-fg} Failed to restart daemon");
|
|
267
|
+
}
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
|
|
258
271
|
statusMsg("{gray-fg}⚙{/gray-fg} Restarting daemon...");
|
|
259
272
|
stopDaemon(targetRoot, { source: "chat-command:/daemon restart" });
|
|
260
273
|
await sleep(500);
|
|
@@ -30,6 +30,9 @@ function restartDaemonFlow(options = {}) {
|
|
|
30
30
|
startDaemon(projectRoot);
|
|
31
31
|
const connected = connection ? await connection.connect() : false;
|
|
32
32
|
if (connected) {
|
|
33
|
+
if (typeof connection.requestStatus === "function") {
|
|
34
|
+
connection.requestStatus();
|
|
35
|
+
}
|
|
33
36
|
statusMsg("{gray-fg}✓{/gray-fg} Daemon reconnected");
|
|
34
37
|
} else {
|
|
35
38
|
statusMsg("{gray-fg}✗{/gray-fg} Failed to reconnect to daemon");
|