UNPKG

@devicecloud.dev/dcd

Version:

Better cloud maestro testing

109 lines (108 loc) 3.19 kB
import chalk = require('chalk'); /** * Centralized styling utilities for CLI output * Provides consistent, developer-friendly visual formatting */ /** * Status symbols with associated colors */ export declare const symbols: { readonly cancelled: string; readonly error: string; readonly info: string; readonly pending: string; readonly queued: string; readonly running: string; readonly success: string; readonly unknown: string; readonly warning: string; }; /** * Color utility functions for semantic styling */ export declare const colors: { readonly bold: chalk.Chalk; readonly dim: chalk.Chalk; readonly error: chalk.Chalk; readonly highlight: chalk.Chalk; readonly info: chalk.Chalk; readonly success: chalk.Chalk; readonly url: chalk.Chalk; readonly warning: chalk.Chalk; }; /** * Dividers for visual separation */ export declare const dividers: { readonly heavy: string; readonly light: string; readonly short: string; }; /** * Format a status with appropriate symbol and color * @param status - The status string to format * @returns Formatted status string with color and symbol */ export declare function formatStatus(status: string): string; /** * Format a section header * @param title - The title of the section * @returns Formatted section header */ export declare function sectionHeader(title: string): string; /** * Format a key-value pair with optional icon * @param icon - Icon to display before the key * @param key - The key name * @param value - The value to display * @returns Formatted key-value string */ export declare function keyValue(icon: string, key: string, value: string): string; /** * Format a list item * @param text - The text of the list item * @param prefix - The prefix character (default: '•') * @returns Formatted list item */ export declare function listItem(text: string, prefix?: string): string; /** * Format a URL * @param url - The URL to format * @returns Formatted URL with styling */ export declare function formatUrl(url: string): string; /** * Format an ID or identifier * @param id - The ID to format * @returns Formatted ID with highlighting */ export declare function formatId(id: string): string; /** * Format a test summary line * @param summary - Object containing test counts * @returns Formatted summary string */ export declare function formatTestSummary(summary: { completed: number; failed: number; passed: number; pending: number; queued: number; running: number; total: number; }): string; /** * Format a box with content * @param content - The content to display in the box * @returns Formatted box with borders */ export declare function box(content: string): string; /** * Generate console URL based on API URL * If a non-default API URL is used, prepends "dev." to the console subdomain * @param apiUrl - The API URL being used * @param uploadId - The upload ID * @param resultId - The result ID * @returns The appropriate console URL */ export declare function getConsoleUrl(apiUrl: string, uploadId: number | string, resultId: number | string): string;