UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

48 lines 2.62 kB
import { RemoteRepoRef } from "@atomist/automation-client/lib/operations/common/RepoId"; import { ProjectPersister } from "@atomist/automation-client/lib/operations/generate/generatorUtils"; import { RepoCreationParameters } from "@atomist/automation-client/lib/operations/generate/RepoCreationParameters"; import { SeedDrivenGeneratorParameters } from "@atomist/automation-client/lib/operations/generate/SeedDrivenGeneratorParameters"; import { Project } from "@atomist/automation-client/lib/project/Project"; import { NoParameters } from "@atomist/automation-client/lib/SmartParameters"; import { Maker } from "@atomist/automation-client/lib/util/constructionUtils"; import { CommandListenerInvocation } from "../listener/CommandListener"; import { ParametersInvocation } from "../listener/ParametersInvocation"; import { ProjectOperationRegistration } from "./ProjectOperationRegistration"; /** * Starting point before transformation. Normally the coordinates of a * seed project, but can also be an in memory project or a function that * computes a RemoteRepoRef or Project from the parameters. */ export declare type StartingPoint<PARAMS> = Project | RemoteRepoRef | ((pi: PARAMS & CommandListenerInvocation<PARAMS>) => (RemoteRepoRef | Project | Promise<Project>)); /** * Action that executes after the project has been generated and pushed * to the remote repository. */ export declare type ProjectAction<PARAMS> = (p: Project, pi: PARAMS & ParametersInvocation<PARAMS>) => Promise<void>; /** * Register a project creation operation */ export interface GeneratorRegistration<PARAMS = NoParameters> extends ProjectOperationRegistration<PARAMS, SeedDrivenGeneratorParameters> { /** * Starting point before transformation. Normally the coordinates of a * seed project, but can also be in memory. * The alternative is to get this from a config object. */ startingPoint?: StartingPoint<PARAMS>; /** * Strategy for persisting projects. Useful in testing. */ projectPersister?: ProjectPersister; /** * Allow customization of the target for this repo, * e.g. to target a different source control system. */ fallbackTarget?: Maker<RepoCreationParameters>; /** * Hooks that get executed after a successful project generation. * Note: these hooks fire after the project has been generated and * pushed to the remote repository. */ afterAction?: ProjectAction<PARAMS & SeedDrivenGeneratorParameters> | Array<ProjectAction<PARAMS & SeedDrivenGeneratorParameters>>; } //# sourceMappingURL=GeneratorRegistration.d.ts.map