import { ChildProcess, SpawnOptions } from 'child_process'; import { Readable, Writable } from 'stream'; export type KubectlOptions = { input?: Buffer | string | Readable; stdout?: Writable; signal?: AbortSignal; env?: Record; unsetEnv?: string[]; }; export type KubectlResult = { stdout: string; stderr: string; }; export type Kubectl = (args: string[], options?: KubectlOptions) => Promise; export type CommandRunner = Kubectl; export type KubectlRead = (args: string[]) => string; export type KubectlCommand = (command: string) => Promise; export declare class KubectlError extends Error { stderr: string; stdout: string; exitCode: number | null; constructor(args: string[], exitCode: number | null, stdout: string, stderr: string, binary?: string); } export declare class AbortedError extends Error { constructor(); } export declare const SECRET_ENV: string[]; export declare function childEnv(env?: NodeJS.ProcessEnv, unset?: string[]): NodeJS.ProcessEnv; type SpawnFn = (command: string, args: string[], options: SpawnOptions) => ChildProcess; export declare function spawnCommand(binary: string, spawnFn?: SpawnFn): CommandRunner; export declare function spawnKubectl(binary?: string, spawnFn?: SpawnFn): Kubectl; export declare function tokenize(command: string): string[]; export declare function commandAdapter(kubectl: Kubectl): KubectlCommand; export declare function guarded(kubectl: Kubectl, isStopped: () => boolean): Kubectl; export declare function isAuthError(error: unknown): boolean; export declare function isNotFound(error: unknown): boolean; export {}; //# sourceMappingURL=kubectl.d.ts.map