UNPKG

hana-cli

Version:
27 lines (26 loc) 925 B
import { ConnectionContext } from './connection-context.js'; /** * Result of command execution */ export interface ExecutionResult { success: boolean; output: string; error?: string; } /** * Executes a hana-cli command and captures its output * * @param commandName - The command to execute (e.g., 'status', 'tables') * @param args - Arguments to pass to the command as key-value pairs * @param context - Optional connection context for project-specific connections * @returns Promise with execution result including the command name for formatting */ export declare function executeCommand(commandName: string, args?: Record<string, any>, context?: ConnectionContext): Promise<ExecutionResult & { commandName: string; }>; /** * Formats execution result for display using the output formatter */ export declare function formatResult(result: ExecutionResult & { commandName: string; }): string;