import type { Command } from "commander"; import { sanitizeForLog } from "../../terminal/ansi.js"; import type { NamedCommandDescriptor } from "./command-group-descriptors.js";
export type CommandDescriptorLike = Pick<NamedCommandDescriptor, "name" | "description">;
export function addCommandDescriptorsToProgram(
program: Command,
descriptors: readonly CommandDescriptorLike[],
existingCommands: Set<string> = new Set(),
): Set<string> { for (const descriptor of descriptors) { const name = assertSafeCommandDescriptorName(descriptor.name); if (existingCommands.has(name)) { continue;
}
program.command(name).description(sanitizeCommandDescriptorDescription(descriptor.description));
existingCommands.add(name);
} return existingCommands;
}
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.1Bemerkung:
(vorverarbeitet am 2026-10-11)
¤
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.