refactor: trim resolver exports

This commit is contained in:
Peter Steinberger
2026-01-17 07:36:09 +00:00
parent 07c93dfd30
commit 1ea8917e2b
2 changed files with 5 additions and 3 deletions

View File

@@ -83,6 +83,5 @@ export {
listTelegramDirectoryPeersFromConfig,
listWhatsAppDirectoryGroupsFromConfig,
listWhatsAppDirectoryPeersFromConfig,
type DirectoryConfigParams,
} from "./directory-config.js";
export type { ChannelId, ChannelPlugin } from "./types.js";

View File

@@ -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}`;
}