π File detail
utils/execSyncWrapper.ts
π§© .tsπ 39 linesπΎ 1,203 bytesπ text
β Back to All Filesπ― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes execSync_DEPRECATED β mainly functions, hooks, or classes. Dependencies touch subprocess spawning. It composes internal code from slowOperations (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, execSync as nodeExecSync,
π€ Exports (heuristic)
execSync_DEPRECATED
π External import roots
Package roots from from "β¦" (relative paths omitted).
child_process
π₯οΈ Source preview
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): Buffer
export function execSync_DEPRECATED(
command: string,
options: ExecSyncOptionsWithStringEncoding,
): string
export function execSync_DEPRECATED(
command: string,
options: ExecSyncOptionsWithBufferEncoding,
): Buffer
export function execSync_DEPRECATED(
command: string,
options?: ExecSyncOptions,
): Buffer | string
export function execSync_DEPRECATED(
command: string,
options?: ExecSyncOptions,
): Buffer | string {
using _ = slowLogging`execSync: ${command.slice(0, 100)}`
return nodeExecSync(command, options)
}