import { ExternalLink } from '@nx/graph/ui-tooltips'; export interface TargetExecutorProps { command?: string; commands?: string[]; script?: string; executor?: string; isCompact?: boolean; link?: string; } export function TargetExecutor({ command, commands, script, executor, isCompact, link, }: TargetExecutorProps) { if (script) { return link ? {script} : script; } if (commands) { if (isCompact) { return link ? ( {commands.length === 1 ? commands[0] : executor} ) : commands.length === 1 ? ( commands[0] ) : ( executor ); } return ( ); } const displayText = command ?? executor ?? ''; return link ? ( {displayText} ) : ( displayText ); }