π File detail
utils/shell/outputLimits.ts
π§© .tsπ 15 linesπΎ 416 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 BASH_MAX_OUTPUT_UPPER_LIMIT, BASH_MAX_OUTPUT_DEFAULT, and getMaxOutputLength β mainly types, interfaces, or factory objects. It composes internal code from envValidation (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { validateBoundedIntEnvVar } from '../envValidation.js' export const BASH_MAX_OUTPUT_UPPER_LIMIT = 150_000 export const BASH_MAX_OUTPUT_DEFAULT = 30_000
π€ Exports (heuristic)
BASH_MAX_OUTPUT_UPPER_LIMITBASH_MAX_OUTPUT_DEFAULTgetMaxOutputLength
π₯οΈ Source preview
import { validateBoundedIntEnvVar } from '../envValidation.js'
export const BASH_MAX_OUTPUT_UPPER_LIMIT = 150_000
export const BASH_MAX_OUTPUT_DEFAULT = 30_000
export function getMaxOutputLength(): number {
const result = validateBoundedIntEnvVar(
'BASH_MAX_OUTPUT_LENGTH',
process.env.BASH_MAX_OUTPUT_LENGTH,
BASH_MAX_OUTPUT_DEFAULT,
BASH_MAX_OUTPUT_UPPER_LIMIT,
)
return result.effective
}