refactor: trim resolver exports
This commit is contained in:
@@ -83,6 +83,5 @@ export {
|
|||||||
listTelegramDirectoryPeersFromConfig,
|
listTelegramDirectoryPeersFromConfig,
|
||||||
listWhatsAppDirectoryGroupsFromConfig,
|
listWhatsAppDirectoryGroupsFromConfig,
|
||||||
listWhatsAppDirectoryPeersFromConfig,
|
listWhatsAppDirectoryPeersFromConfig,
|
||||||
type DirectoryConfigParams,
|
|
||||||
} from "./directory-config.js";
|
} from "./directory-config.js";
|
||||||
export type { ChannelId, ChannelPlugin } from "./types.js";
|
export type { ChannelId, ChannelPlugin } from "./types.js";
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { formatTargetHint } from "./target-format.js";
|
|
||||||
|
|
||||||
export function missingTargetMessage(provider: string, hint?: string): string {
|
export function missingTargetMessage(provider: string, hint?: string): string {
|
||||||
return `Delivering to ${provider} requires target${formatTargetHint(hint)}`;
|
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 {
|
export function unknownTargetError(provider: string, raw: string, hint?: string): Error {
|
||||||
return new Error(unknownTargetMessage(provider, raw, hint));
|
return new Error(unknownTargetMessage(provider, raw, hint));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatTargetHint(hint?: string, withLabel = false): string {
|
||||||
|
if (!hint) return "";
|
||||||
|
return withLabel ? ` Hint: ${hint}` : ` ${hint}`;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user