import type { FileHandle } from 'fs/promises'; /** * Formats text as italic for terminal display using ANSI escape codes. * * @param text - The string to be formatted as italic * @returns The input string wrapped with ANSI escape codes for italic formatting * * @example * ```typescript * console.log(italic('This will be italic in the terminal')); * ``` */ export declare function italic(text: string): string; /** * Wraps the provided text with ANSI escape codes to display as bold in terminal output. * * @param text - The string to be formatted as bold * @returns The input string wrapped with ANSI bold formatting codes * * @example * ```typescript * console.log(bold('This text will be bold')); * ``` */ export declare function bold(text: string): string; /** * Masks a string by replacing characters with a mask character. * * @param text - The string to be masked * @param options - Configuration options * @param options.clear - Number of characters from the beginning to leave unmasked (default: 0) * @param options.mask - Character to use for masking (default: '*') * @returns A string with characters replaced by the mask character, except for the first `clear` characters * * @example * // Mask an entire string * mask("password") // "********" * * @example * // Leave the first 2 characters unmasked * mask("password", { clear: 2 }) // "pa******" * * @example * // Use a custom mask character * mask("password", { mask: "x" }) // "xxxxxxxx" */ export declare function mask(text: string, options?: { clear?: number; mask?: string; }): string; /** * Creates a secure temporary file with random UUID and restricted permissions. * * This function creates a temporary file in the system's temp directory with 0o600 permissions * (read/write for owner only) and a randomized name to prevent predictability. * * @param params - Configuration options for the temporary file * @param params.prefix - Prefix for the generated filename (defaults to 'tmp') * @param params.ext - File extension for the temporary file (defaults to empty string) * * @returns A FileHandle object extended with additional properties: * - `filename`: The generated name of the temporary file * - `filepath`: The full path to the temporary file * * @example * ```typescript * // Create a secure temporary JSON file * const tempFile = await createSecureTempFile({ prefix: 'config', ext: '.json' }) * await tempFile.writeFile('{"data": "example"}') * await tempFile.close() * ``` */ export declare function createSecureTempFile(params?: { prefix?: string; ext?: string; }): Promise;