refactor: lint cleanups and helpers

This commit is contained in:
Peter Steinberger
2025-12-23 00:28:40 +00:00
parent f5837dff9c
commit 918cbdcf03
39 changed files with 679 additions and 338 deletions

View File

@@ -8,7 +8,7 @@ import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
import {
createWaSocket,
formatError,
WA_WEB_AUTH_DIR,
resolveWebAuthDir,
waitForWaConnection,
} from "./session.js";
@@ -56,7 +56,7 @@ export async function loginWeb(
}
}
if (code === DisconnectReason.loggedOut) {
await fs.rm(WA_WEB_AUTH_DIR, { recursive: true, force: true });
await fs.rm(resolveWebAuthDir(), { recursive: true, force: true });
console.error(
danger(
"WhatsApp reported the session is logged out. Cleared cached web session; please rerun clawdis login and scan the QR again.",