import type { PluginPackageChannel } from "../plugins/manifest.js"; import { normalizeOptionalString } from "../shared/string-coerce.js"; import { listBundledChannelCatalogEntries } from "./bundled-channel-catalog-read.js"; import { CHAT_CHANNEL_ORDER, type ChatChannelId } from "./ids.js"; import { buildManifestChannelMeta } from "./plugins/channel-meta.js"; import type { ChannelMeta } from "./plugins/types.core.js";
export type ChatChannelMeta = ChannelMeta;
const CHAT_CHANNEL_ID_SET = new Set<string>(CHAT_CHANNEL_ORDER);
function toChatChannelMeta(params: {
id: ChatChannelId;
channel: PluginPackageChannel;
}): ChatChannelMeta { const label = normalizeOptionalString(params.channel.label); if (!label) { thrownew Error(`Missing label for bundled chat channel "${params.id}"`);
}
export function buildChatChannelMetaById(): Record<ChatChannelId, ChatChannelMeta> { const entries = new Map<ChatChannelId, ChatChannelMeta>();
for (const entry of listBundledChannelCatalogEntries()) { const rawId = normalizeOptionalString(entry.id); if (!rawId || !CHAT_CHANNEL_ID_SET.has(rawId)) { continue;
} const id = rawId;
entries.set(
id,
toChatChannelMeta({
id,
channel: entry.channel,
}),
);
}
return Object.freeze(Object.fromEntries(entries)) as Record<ChatChannelId, ChatChannelMeta>;
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet am 2026-05-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.