blob: cdb4f0b499d5cb0d9ebd7c2151d546c00aed3517 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/// <reference types="node" />
import { ChildProcess, SpawnOptions } from 'child_process';
import { GitExecutorResult } from '../types';
declare type SimpleGitTaskPluginContext = {
readonly method: string;
readonly commands: string[];
};
export interface SimpleGitPluginTypes {
'spawn.args': {
data: string[];
context: SimpleGitTaskPluginContext & {};
};
'spawn.options': {
data: Partial<SpawnOptions>;
context: SimpleGitTaskPluginContext & {};
};
'spawn.after': {
data: void;
context: SimpleGitTaskPluginContext & {
spawned: ChildProcess;
close(exitCode: number, reason?: Error): void;
kill(reason: Error): void;
};
};
'task.error': {
data: {
error?: Error;
};
context: SimpleGitTaskPluginContext & GitExecutorResult;
};
}
export declare type SimpleGitPluginType = keyof SimpleGitPluginTypes;
export interface SimpleGitPlugin<T extends SimpleGitPluginType> {
action(data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data;
type: T;
}
export {};
|