UNPKG

xc-mcp

Version:

MCP server that wraps Xcode command-line tools for iOS/macOS development workflows

40 lines 1.4 kB
/** * Shell Escaping Utilities * * Provides safe escaping for shell arguments to prevent command injection. * Note: The safest approach is to use spawn with argument arrays instead of shell strings. */ /** * Escape a string for safe use in a shell command. * Wraps the string in single quotes and escapes any single quotes within. * * This is the POSIX-compliant approach that works on macOS/Linux. * * @param arg - The argument to escape * @returns Safely escaped argument */ export declare function escapeShellArg(arg: string): string; /** * Validate that a bundle ID follows the correct format. * Bundle IDs should be reverse domain notation (e.g., com.example.myapp). * * @param bundleId - The bundle ID to validate * @returns true if valid, false otherwise */ export declare function isValidBundleId(bundleId: string): boolean; /** * Validate that a path is safe and doesn't contain path traversal attempts. * * @param path - The path to validate * @returns true if safe, false if potentially dangerous */ export declare function isSafePath(path: string): boolean; /** * Validate a UDID format (used for iOS simulators and devices). * UDIDs should be alphanumeric with hyphens. * * @param udid - The UDID to validate * @returns true if valid, false otherwise */ export declare function isValidUdid(udid: string): boolean; //# sourceMappingURL=shell-escape.d.ts.map