UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

40 lines 1.76 kB
import { Goals } from "../goal/Goals"; import { PushListenerInvocation } from "../listener/PushListener"; import { PushTest } from "../mapping/PushTest"; import { PredicateMappingTerm } from "../mapping/support/PredicateMappingTerm"; import { PushRule } from "../mapping/support/PushRule"; import { GoalComponent } from "./GoalComponent"; /** * PushRule implementation exposed in DSL. Continues fluent API. */ export declare class GoalSetterMapping<P extends PushListenerInvocation = PushListenerInvocation> extends PushRule<Goals> { private goalsName; get label(): string; constructor(guard1: PushTest, guards: PushTest[], reason?: string); setGoals(goalComponent: GoalComponent): this; /** * Set goals dynamically, depending on this push * @param {(inv: P) => GoalComponent} f * @return {this} */ setGoalsWhen(f: (inv: P) => GoalComponent | Promise<GoalComponent>): this; /** * Prevent setting any further goals on this push. Ordering matters: * goals may previously have been set. * @param name name of the empty Goals. Default is "No Goals" */ setNoMoreGoals(name?: string): void; } /** * Simple GoalSetter DSL. Allows use of booleans and functions * returning boolean in predicate expressions * @param {PushTest} guard1 * @param {PushTest} guards */ export declare function whenPushSatisfies<P extends PushListenerInvocation = PushListenerInvocation>(guard1: PredicateMappingTerm<P>, ...guards: Array<PredicateMappingTerm<P>>): GoalSetterMapping<P>; /** * PushRule that matches every push * @type {GoalSetterMapping} */ export declare function onAnyPush<P extends PushListenerInvocation = PushListenerInvocation>(): GoalSetterMapping<P>; //# sourceMappingURL=goalDsl.d.ts.map