UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

29 lines 1.49 kB
import { SdmGoalState } from "../../typings/types"; import { StatefulPushListenerInvocation } from "../dsl/goalContribution"; import { SdmGoalEvent } from "../goal/SdmGoalEvent"; import { PushListenerInvocation } from "../listener/PushListener"; import { PredicateMapping } from "./PredicateMapping"; import { PushTest } from "./PushTest"; /** * Extension to PushTest to pre-condition on SDM goal events, so called GoalTests */ export interface GoalTest extends PushTest { pushTest: PushTest; } export declare function isGoal(options?: { name?: string | RegExp; state?: SdmGoalState; output?: string | RegExp; pushTest?: PushTest; data?: string | RegExp; }): GoalTest; export declare function matchStringOrRegexp(pattern: string | RegExp, toMatch: string): boolean; export declare function goalTest(name: string, goalMapping: (goal: SdmGoalEvent, pli: StatefulPushListenerInvocation) => Promise<boolean>, pushTest?: PushTest): GoalTest; /** * Wrap a PushTest to make sure it doesn't get the chance to match on goal planning * based on goal events */ export declare function notGoalOrOutputTest(pushTest: PushTest): PushTest; export declare function wrapPredicateMapping<P extends PushListenerInvocation = PushListenerInvocation>(guards: PredicateMapping<P>): PredicateMapping<P>; export declare function wrapTest<P extends PushListenerInvocation = PushListenerInvocation>(test: PredicateMapping<P>): PredicateMapping<P>; //# sourceMappingURL=goalTest.d.ts.map