@plumpslabs/fennec-cli 1.13.8 → 1.13.9
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/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2091,7 +2091,7 @@ function hexColor(color) {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
var fennecOrange2 = hexColor("#FF6432");
|
|
2093
2093
|
var fennecGold = hexColor("#FFB347");
|
|
2094
|
-
var VERSION = "1.13.
|
|
2094
|
+
var VERSION = "1.13.9";
|
|
2095
2095
|
var cachedBanner = null;
|
|
2096
2096
|
var cachedCompact = null;
|
|
2097
2097
|
function generateBanner() {
|
|
@@ -4289,33 +4289,38 @@ Use ${pc8.cyan(`fennec kill <pid>`)} to kill a system process by its PID.`));
|
|
|
4289
4289
|
}
|
|
4290
4290
|
async function killAll(signal, force) {
|
|
4291
4291
|
const tracked = readTracked();
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
console.error(` ${pc8.dim("No running tracked apps to kill.")}`);
|
|
4292
|
+
if (tracked.length === 0) {
|
|
4293
|
+
console.error(` ${pc8.dim("No tracked apps to kill.")}`);
|
|
4295
4294
|
return;
|
|
4296
4295
|
}
|
|
4296
|
+
const running = tracked.filter((t) => isTrackedRunning(t));
|
|
4297
|
+
const stopped = tracked.filter((t) => !isTrackedRunning(t));
|
|
4297
4298
|
console.error(`
|
|
4298
|
-
${pc8.bold(`Kill ${running.length} tracked app(s)?`)}`);
|
|
4299
|
-
console.error(` ${pc8.dim("
|
|
4299
|
+
${pc8.bold(`Kill ${running.length} running + remove ${stopped.length} stopped tracked app(s)?`)}`);
|
|
4300
|
+
console.error(` ${pc8.dim("Permanently removes every Fennec-tracked app \u2014 other processes are untouched.")}
|
|
4300
4301
|
`);
|
|
4301
4302
|
const confirmed = force || await confirmPrompt(`${pc8.red("Are you sure?")} ${pc8.dim("This cannot be undone")}`, false);
|
|
4302
4303
|
if (!confirmed) {
|
|
4303
4304
|
console.error(` ${pc8.dim("Cancelled.")}`);
|
|
4304
4305
|
return;
|
|
4305
4306
|
}
|
|
4306
|
-
const spinner = createSpinner(`Killing ${running.length} tracked app(s)...`);
|
|
4307
|
+
const spinner = createSpinner(`Killing ${running.length} + removing ${stopped.length} tracked app(s)...`);
|
|
4307
4308
|
let killed = 0, failed = 0;
|
|
4308
4309
|
for (const t of running) {
|
|
4309
4310
|
if (killProcess(t.pid, signal)) {
|
|
4310
4311
|
killed++;
|
|
4311
|
-
removeTrackedByPid(t.pid);
|
|
4312
4312
|
} else {
|
|
4313
4313
|
failed++;
|
|
4314
4314
|
}
|
|
4315
|
+
removeTrackedByPid(t.pid);
|
|
4316
|
+
}
|
|
4317
|
+
for (const t of stopped) {
|
|
4318
|
+
removeTrackedByPid(t.pid);
|
|
4315
4319
|
}
|
|
4316
4320
|
await new Promise((r) => setTimeout(r, 300));
|
|
4317
|
-
|
|
4318
|
-
|
|
4321
|
+
const total = running.length + stopped.length;
|
|
4322
|
+
total > 0 ? spinner.succeed(`${killed} killed, ${stopped.length} stopped entr${stopped.length === 1 ? "y" : "ies"} removed`) : spinner.fail("Failed to kill apps");
|
|
4323
|
+
if (failed > 0) console.error(` ${pc8.yellow(`${failed} running app(s) could not be killed`)}`);
|
|
4319
4324
|
}
|
|
4320
4325
|
|
|
4321
4326
|
// src/commands/stop.ts
|