From 1ea8917e2b78c8d6a14dd372858e3446be6eaff2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 17 Jan 2026 07:36:09 +0000 Subject: [PATCH] refactor: trim resolver exports --- src/channels/plugins/index.ts | 1 - src/infra/outbound/target-errors.ts | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/channels/plugins/index.ts b/src/channels/plugins/index.ts index a83d14186..c3611056d 100644 --- a/src/channels/plugins/index.ts +++ b/src/channels/plugins/index.ts @@ -83,6 +83,5 @@ export { listTelegramDirectoryPeersFromConfig, listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig, - type DirectoryConfigParams, } from "./directory-config.js"; export type { ChannelId, ChannelPlugin } from "./types.js"; diff --git a/src/infra/outbound/target-errors.ts b/src/infra/outbound/target-errors.ts index f6d303cb9..76b12e985 100644 --- a/src/infra/outbound/target-errors.ts +++ b/src/infra/outbound/target-errors.ts @@ -1,5 +1,3 @@ -import { formatTargetHint } from "./target-format.js"; - export function missingTargetMessage(provider: string, hint?: string): string { return `Delivering to ${provider} requires target${formatTargetHint(hint)}`; } @@ -23,3 +21,8 @@ export function unknownTargetMessage(provider: string, raw: string, hint?: strin export function unknownTargetError(provider: string, raw: string, hint?: string): Error { return new Error(unknownTargetMessage(provider, raw, hint)); } + +function formatTargetHint(hint?: string, withLabel = false): string { + if (!hint) return ""; + return withLabel ? ` Hint: ${hint}` : ` ${hint}`; +}