import { type ExecSyncOptions } from 'child_process'; import { AsyncLocalStorage } from 'node:async_hooks'; import type { DiagnosticRecord, DiagnosticsOptions, InspectOptions } from './types'; declare const diagnosticContext: AsyncLocalStorage<{ records: DiagnosticRecord[]; }>; interface CommandSpec { feature: string; command: string; args?: string[]; timeoutMs?: number; signal?: AbortSignal; cwd?: string; env?: NodeJS.ProcessEnv; maxBufferBytes?: number; } declare const WINDIR: string; declare const execOptsWin: ExecSyncOptions; declare const execOptsLinux: ExecSyncOptions; declare function toInt(value: any): number; declare function splitByNumber(str: any): string[]; declare const stringObj: String; declare const stringReplace: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; declare const stringToLower: () => string; declare const stringToString: () => string; declare const stringSubstr: (from: number, length?: number) => string; declare const stringSubstring: (start: number, end?: number) => string; declare const stringTrim: () => string; declare const stringStartWith: (searchString: string, position?: number) => boolean; declare const mathMin: (...values: number[]) => number; declare function isFunction(functionToCheck: any): any; declare function unique(obj: any): any[]; declare function sortByKey(array: any, keys: any): any; declare function cores(): number; declare function getValue(lines: string[], property: string, separator?: string, trimmed?: boolean, lineMatch?: boolean): string; declare function decodeEscapeSequence(str: any, base: any): any; declare function parseDateTime(dt: string, culture?: any): { date: string; time: string; }; declare function parseHead(head: string, rights: number): Array<{ from: number; to: number; cap: string; }>; declare function findObjectByKey(array: any, key: any, value: any): number; declare function getPowershell(): void; declare function getPowershellVersion(): string; declare function pushDiagnostic(diagnostic: any): void; declare function diagnostics(options?: DiagnosticsOptions): DiagnosticRecord[]; declare function clearDiagnostics(): void; declare function onDiagnostic(listener: (record: DiagnosticRecord) => void): () => void; declare function applyInspectPolicy(options?: InspectOptions): InspectOptions; declare function getVboxmanage(): string; declare function powerShellStart(): void; declare function powerShellRelease(): void; declare function powerShell(cmd: string, options?: { timeout?: number; feature?: string; }): Promise; declare function execSafe(cmd: string, args?: string[], options?: any): Promise; declare function withTimeout(label: string, task: Promise, timeoutMs?: number, signal?: AbortSignal): Promise; declare function runCommand(command: string, args?: string[], options?: InspectOptions & { feature?: string; cwd?: string; env?: NodeJS.ProcessEnv; maxBufferBytes?: number; }): Promise; declare function runCommandSpec(spec: CommandSpec): Promise; declare function readFileSafe(file: string, options?: InspectOptions & { encoding?: BufferEncoding; feature?: string; }): Promise; declare function getCodepage(): string | undefined; declare function smartMonToolsInstalled(): boolean; declare function smartMonToolsInfo(): any; declare function isRaspberry(cpuinfo?: string[] | string): boolean; declare function isRaspbian(): boolean | ""; declare function execWin(cmd: any, opts: any, callback: any): void; declare function darwinXcodeExists(): boolean; declare function nanoSeconds(): number; declare function countUniqueLines(lines: any, startingWith: any): number; declare function countLines(lines: any, startingWith: any): number; declare function sanitizeShellString(str: any, strict?: boolean): string; declare function isPrototypePolluted(): boolean; declare function restoreStringPrototype(value: any): void; declare function getFilesInPath(source: any): string[]; declare function decodePiCpuinfo(lines?: string[] | string): any; declare function getRpiGpu(cpuinfo?: string[] | string): string; declare function promiseAll(promises: Array>): Promise<{ errors: any[]; results: any[]; }>; declare function promisify(nodeStyleFunction: (...args: any[]) => void): (...args: any[]) => Promise; declare function promisifySave(nodeStyleFunction: (...args: any[]) => void): (...args: any[]) => Promise; declare function linuxVersion(): string; declare function plistParser(xmlStr: any): any; declare function plistReader(output: any): Record; declare function semverCompare(v1: any, v2: any): number; declare function getAppleModel(key: any): { key: any; model: string; version: string; }; declare function checkWebsite(url: string, timeout?: number): Promise<{ url: string; statusCode: number; message?: string; time: number; }>; declare function cleanString(str: any): any; declare function noop(): void; export { toInt, splitByNumber, execOptsWin, execOptsLinux, getCodepage, execWin, isFunction, unique, sortByKey, cores, getValue, decodeEscapeSequence, parseDateTime, parseHead, findObjectByKey, darwinXcodeExists, getVboxmanage, powerShell, powerShellStart, powerShellRelease, execSafe, nanoSeconds, countUniqueLines, countLines, noop, isRaspberry, isRaspbian, sanitizeShellString, isPrototypePolluted, decodePiCpuinfo, getRpiGpu, promiseAll, promisify, promisifySave, smartMonToolsInstalled, smartMonToolsInfo, diagnostics, diagnosticContext, clearDiagnostics, onDiagnostic, pushDiagnostic, runCommand, readFileSafe, withTimeout, linuxVersion, plistParser, plistReader, stringObj, stringReplace, stringToLower, stringToString, stringSubstr, stringSubstring, stringTrim, stringStartWith, restoreStringPrototype, mathMin, WINDIR, getFilesInPath, semverCompare, getAppleModel, checkWebsite, cleanString, getPowershell, getPowershellVersion, applyInspectPolicy, runCommandSpec }; //# sourceMappingURL=util.d.ts.map