import {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)}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。