fix: clean lint issues
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import fs from "node:fs/promises";
|
||||
|
||||
import { getResolvedLoggerSettings } from "../../logging.js";
|
||||
import { theme } from "../../terminal/theme.js";
|
||||
import { defaultRuntime, type RuntimeEnv } from "../../runtime.js";
|
||||
import { theme } from "../../terminal/theme.js";
|
||||
|
||||
export type ProvidersLogsOptions = {
|
||||
provider?: string;
|
||||
@@ -128,7 +128,8 @@ export async function providersLogsCommand(
|
||||
runtime: RuntimeEnv = defaultRuntime,
|
||||
) {
|
||||
const provider = parseProviderFilter(opts.provider);
|
||||
const limitRaw = typeof opts.lines === "string" ? Number(opts.lines) : opts.lines;
|
||||
const limitRaw =
|
||||
typeof opts.lines === "string" ? Number(opts.lines) : opts.lines;
|
||||
const limit =
|
||||
typeof limitRaw === "number" && Number.isFinite(limitRaw) && limitRaw > 0
|
||||
? Math.floor(limitRaw)
|
||||
|
||||
@@ -57,11 +57,7 @@ const isGetUpdatesConflict = (err: unknown) => {
|
||||
};
|
||||
const errorCode = typed.error_code ?? typed.errorCode;
|
||||
if (errorCode !== 409) return false;
|
||||
const haystack = [
|
||||
typed.method,
|
||||
typed.description,
|
||||
typed.message,
|
||||
]
|
||||
const haystack = [typed.method, typed.description, typed.message]
|
||||
.filter((value): value is string => typeof value === "string")
|
||||
.join(" ")
|
||||
.toLowerCase();
|
||||
|
||||
@@ -18,7 +18,6 @@ export type ResolvedWhatsAppAccount = {
|
||||
authDir: string;
|
||||
isLegacyAuthDir: boolean;
|
||||
selfChatMode?: boolean;
|
||||
dmPolicy?: WhatsAppAccountConfig["dmPolicy"];
|
||||
allowFrom?: string[];
|
||||
groupAllowFrom?: string[];
|
||||
groupPolicy?: GroupPolicy;
|
||||
@@ -118,7 +117,6 @@ export function resolveWhatsAppAccount(params: {
|
||||
groupAllowFrom:
|
||||
accountCfg?.groupAllowFrom ?? params.cfg.whatsapp?.groupAllowFrom,
|
||||
groupPolicy: accountCfg?.groupPolicy ?? params.cfg.whatsapp?.groupPolicy,
|
||||
dmPolicy: accountCfg?.dmPolicy ?? params.cfg.whatsapp?.dmPolicy,
|
||||
textChunkLimit:
|
||||
accountCfg?.textChunkLimit ?? params.cfg.whatsapp?.textChunkLimit,
|
||||
groups: accountCfg?.groups ?? params.cfg.whatsapp?.groups,
|
||||
|
||||
Reference in New Issue
Block a user