chore: drop Clawdis legacy references
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { findLegacyLaunchAgents, uninstallLegacyLaunchAgents } from "./launchd.js";
|
||||
import { findLegacyScheduledTasks, uninstallLegacyScheduledTasks } from "./schtasks.js";
|
||||
import { findLegacySystemdUnits, uninstallLegacySystemdUnits } from "./systemd.js";
|
||||
|
||||
export type LegacyGatewayService = {
|
||||
@@ -34,19 +33,6 @@ function formatLegacySystemdUnits(
|
||||
}));
|
||||
}
|
||||
|
||||
function formatLegacyScheduledTasks(
|
||||
tasks: Awaited<ReturnType<typeof findLegacyScheduledTasks>>,
|
||||
): LegacyGatewayService[] {
|
||||
return tasks.map((task) => ({
|
||||
platform: "win32",
|
||||
label: task.name,
|
||||
detail: [
|
||||
task.installed ? "installed" : "not installed",
|
||||
task.scriptExists ? `script: ${task.scriptPath}` : "script missing",
|
||||
].join(", "),
|
||||
}));
|
||||
}
|
||||
|
||||
export async function findLegacyGatewayServices(
|
||||
env: Record<string, string | undefined>,
|
||||
): Promise<LegacyGatewayService[]> {
|
||||
@@ -60,11 +46,6 @@ export async function findLegacyGatewayServices(
|
||||
return formatLegacySystemdUnits(units);
|
||||
}
|
||||
|
||||
if (process.platform === "win32") {
|
||||
const tasks = await findLegacyScheduledTasks(env);
|
||||
return formatLegacyScheduledTasks(tasks);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -85,10 +66,5 @@ export async function uninstallLegacyGatewayServices({
|
||||
return formatLegacySystemdUnits(units);
|
||||
}
|
||||
|
||||
if (process.platform === "win32") {
|
||||
const tasks = await uninstallLegacyScheduledTasks({ env, stdout });
|
||||
return formatLegacyScheduledTasks(tasks);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user