Something went wrong. Try again.
source dump of claude code forked from oppi.li/claude-code
Something went wrong. Try again.
1.2 kB · 38 lines
TypeScript
at main
123456789101112131415161718192021222324252627282930313233343536373839import { type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, execSync as nodeExecSync,} from 'child_process'import { slowLogging } from './slowOperations.js'
/** * @deprecated Use async alternatives when possible. Sync exec calls block the event loop. * * Wrapped execSync with slow operation logging. * Use this instead of child_process execSync directly to detect performance issues. * * @example * import { execSync_DEPRECATED } from './execSyncWrapper.js' * const result = execSync_DEPRECATED('git status', { encoding: 'utf8' }) */export function execSync_DEPRECATED(command: string): Bufferexport function execSync_DEPRECATED( command: string, options: ExecSyncOptionsWithStringEncoding,): stringexport function execSync_DEPRECATED( command: string, options: ExecSyncOptionsWithBufferEncoding,): Bufferexport function execSync_DEPRECATED( command: string, options?: ExecSyncOptions,): Buffer | stringexport function execSync_DEPRECATED( command: string, options?: ExecSyncOptions,): Buffer | string { using _ = slowLogging`execSync: ${command.slice(0, 100)}` return nodeExecSync(command, options)}