1 | import { GitProject } from "@atomist/automation-client/lib/project/git/GitProject";
|
2 | import { ProgressLog } from "../../spi/log/ProgressLog";
|
3 | import { RepoContext } from "../context/SdmContext";
|
4 | import { SoftwareDeliveryMachineConfiguration } from "../machine/SoftwareDeliveryMachineOptions";
|
5 | import { PushTest } from "../mapping/PushTest";
|
6 | import { ExecuteGoalResult } from "./ExecuteGoalResult";
|
7 | import { Goal } from "./Goal";
|
8 | import { Parameterized } from "./GoalWithFulfillment";
|
9 | import { SdmGoalEvent } from "./SdmGoalEvent";
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | export declare type ExecuteGoal = (r: GoalInvocation) => Promise<void | ExecuteGoalResult>;
|
15 | export declare type PrepareForGoalExecution = (p: GitProject, r: GoalInvocation) => Promise<void | ExecuteGoalResult>;
|
16 | export declare enum GoalProjectListenerEvent {
|
17 | before = "before",
|
18 | after = "after"
|
19 | }
|
20 | export declare type GoalProjectListener = (p: GitProject, r: GoalInvocation, event: GoalProjectListenerEvent) => Promise<void | ExecuteGoalResult>;
|
21 | export interface GoalProjectListenerRegistration {
|
22 | name: string;
|
23 | listener: GoalProjectListener;
|
24 | pushTest?: PushTest;
|
25 | events?: GoalProjectListenerEvent[];
|
26 | }
|
27 | export interface GoalInvocation extends RepoContext, Parameterized {
|
28 | |
29 |
|
30 |
|
31 | configuration: SoftwareDeliveryMachineConfiguration;
|
32 | |
33 |
|
34 |
|
35 | goal: Goal;
|
36 | |
37 |
|
38 |
|
39 | goalEvent: SdmGoalEvent;
|
40 | |
41 |
|
42 |
|
43 |
|
44 |
|
45 | progressLog: ProgressLog;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | export declare function afterListener(listener: PrepareForGoalExecution): GoalProjectListener;
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | export declare function beforeListener(listener: PrepareForGoalExecution): GoalProjectListener;
|
57 |
|
\ | No newline at end of file |