1 | import { InterpretLog } from "../../../spi/log/InterpretedLog";
|
2 | import { RepoContext } from "../../context/SdmContext";
|
3 | import { PushListenerInvocation } from "../../listener/PushListener";
|
4 | import { PushTest } from "../../mapping/PushTest";
|
5 | import { Goal } from "../Goal";
|
6 | import { ExecuteGoal, GoalProjectListenerRegistration } from "../GoalInvocation";
|
7 | import { PlannedGoal } from "../GoalWithFulfillment";
|
8 | import { ReportProgress } from "../progress/ReportProgress";
|
9 | import { SdmGoalEvent } from "../SdmGoalEvent";
|
10 | export declare type GoalFulfillment = GoalImplementation | GoalSideEffect;
|
11 | export interface GoalImplementation {
|
12 | implementationName: string;
|
13 | goal: Goal;
|
14 | goalExecutor: ExecuteGoal;
|
15 | pushTest: PushTest;
|
16 | logInterpreter: InterpretLog;
|
17 | progressReporter?: ReportProgress;
|
18 | projectListeners: GoalProjectListenerRegistration | GoalProjectListenerRegistration[];
|
19 | }
|
20 | export declare function isGoalImplementation(f: GoalFulfillment): f is GoalImplementation;
|
21 |
|
22 | export interface GoalSideEffect {
|
23 |
|
24 | sideEffectName: string;
|
25 |
|
26 | goal: Goal;
|
27 | |
28 |
|
29 |
|
30 |
|
31 | pushTest?: PushTest;
|
32 | |
33 |
|
34 |
|
35 |
|
36 | registration?: string;
|
37 | }
|
38 | export declare function isGoalSideEffect(f: GoalFulfillment): f is GoalSideEffect;
|
39 | export declare function isGoalFulfillment(g: {
|
40 | fulfillment?: PlannedGoal["fulfillment"];
|
41 | }): g is {
|
42 | fulfillment: PlannedGoal["fulfillment"];
|
43 | };
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export interface GoalFulfillmentCallback {
|
50 | goal: Goal;
|
51 | callback: (goal: SdmGoalEvent, context: RepoContext) => Promise<SdmGoalEvent>;
|
52 | }
|
53 |
|
54 |
|
55 |
|
56 | export interface GoalImplementationMapper {
|
57 | hasImplementation(): boolean;
|
58 | addSideEffect(sideEffect: GoalSideEffect): this;
|
59 | addFulfillmentCallback(callback: GoalFulfillmentCallback): this;
|
60 | findImplementationBySdmGoal(goal: SdmGoalEvent): GoalImplementation;
|
61 | findFulfillmentByPush(goal: Goal, inv: PushListenerInvocation): Promise<GoalFulfillment | undefined>;
|
62 | findFulfillmentCallbackForGoal(g: SdmGoalEvent): GoalFulfillmentCallback[];
|
63 | findGoalBySdmGoal(g: SdmGoalEvent): Goal | undefined;
|
64 | }
|
65 |
|
\ | No newline at end of file |