@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
43 lines • 1.94 kB
TypeScript
import { HandlerResult } from "@atomist/automation-client/lib/HandlerResult";
import { GitProject } from "@atomist/automation-client/lib/project/git/GitProject";
import { ExecuteGoal } from "../../../api/goal/GoalInvocation";
import { ProjectIdentifier } from "../../../core";
/**
* Execute npm publish
*
* Tags with branch-name unless the `tag` option is specified. If the branch === the repo's default branch
* also the next tags is being set
*
* @param projectLoader
* @param projectIdentifier
* @param preparations
* @return {ExecuteGoal}
*/
export declare function executePublish(projectIdentifier: ProjectIdentifier, options: NpmOptions): ExecuteGoal;
export declare function deleteBranchTag(branch: string, project: GitProject, options: NpmOptions): Promise<HandlerResult>;
/**
* Create an npmrc file for the package.
*/
export declare function configureNpmRc(options: NpmOptions, project: {
baseDir: string;
}): Promise<NpmOptions>;
/**
* NPM options used when publishing NPM modules.
*/
export interface NpmOptions {
/** The contents of a .npmrc file, typically containing authentication information */
npmrc: string;
/** Optional registry, use NPM default if not present, currently "https://registry.npmjs.org" */
registry?: string;
/** Optional publication access, use NPM default if not present, currently "restricted" */
access?: "public" | "restricted";
/** Optional publication tag, use NPM default if not present, currently "latest" */
tag?: string;
/** Optionally tag default branch builds with the next dist-tag */
nextTag?: boolean;
/** Optional flag, to indicate if a status should be created on the SCM containing a link to the package */
status?: boolean;
}
export declare function gitBranchToNpmTag(branchName: string): string;
export declare function gitBranchToNpmVersion(branchName: string): string;
//# sourceMappingURL=executePublish.d.ts.map