renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
52 lines (51 loc) • 1.47 kB
TypeScript
import type { SpawnOptions as ChildProcessSpawnOptions } from 'node:child_process';
export interface ToolConstraint {
toolName: string;
constraint?: string | null;
}
export interface ToolConfig {
datasource: string;
extractVersion?: string;
packageName: string;
hash?: boolean;
versioning: string;
}
export type Opt<T> = T | null | undefined;
export type VolumesPair = [string, string];
export type VolumeOption = Opt<string | VolumesPair>;
export interface DockerOptions {
volumes?: Opt<VolumeOption[]>;
envVars?: Opt<Opt<string>[]>;
cwd?: Opt<string>;
}
export type DataListener = (chunk: any) => void;
export interface OutputListeners {
stdout?: DataListener[];
stderr?: DataListener[];
}
export interface RawExecOptions extends ChildProcessSpawnOptions {
/**
* @deprecated renovate uses utf8, encoding property is ignored.
*/
encoding: string;
maxBuffer?: number | undefined;
cwd?: string;
outputListeners?: OutputListeners;
}
export interface ExecResult {
stdout: string;
stderr: string;
}
export type ExtraEnv<T = unknown> = Record<string, T>;
export interface ExecOptions {
cwd?: string;
cwdFile?: string;
env?: Opt<ExtraEnv>;
extraEnv?: Opt<ExtraEnv>;
docker?: Opt<DockerOptions>;
toolConstraints?: Opt<ToolConstraint[]>;
preCommands?: Opt<string[]>;
ignoreStdout?: boolean;
maxBuffer?: number | undefined;
timeout?: number | undefined;
}