#!/usr/bin/env node import cosmiconfig from 'cosmiconfig'; import { ArgsType, IChangelogOptions, ICommentCommandOptions, ICreateLabelsCommandOptions, IInitCommandOptions, ILabelCommandOptions, IPRCheckCommandOptions, IPRCommandOptions, IReleaseOptions, IShipItCommandOptions } from './cli/args'; import GitHubRelease, { IGitHubReleaseOptions, VersionLabel } from './github-release'; import { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } from 'tapable'; import LogParse from './log-parse'; import SEMVER from './semver'; import { ILogger } from './utils/logger'; interface IAuthor { name?: string; email?: string; } interface IRepository { owner?: string; repo?: string; token?: string; } export interface IAutoHooks { beforeRun: SyncHook<[IGitHubReleaseOptions]>; beforeShipIt: SyncHook<[]>; getAuthor: AsyncSeriesBailHook<[], IAuthor | void>; getPreviousVersion: AsyncSeriesBailHook<[(release: string) => string], string>; getRepository: AsyncSeriesBailHook<[], IRepository | void>; publish: AsyncSeriesHook<[SEMVER]>; onCreateGitHubRelease: SyncHook<[GitHubRelease]>; onCreateLogParse: SyncHook<[LogParse]>; } export declare class AutoRelease { hooks: IAutoHooks; logger: ILogger; args: ArgsType; githubRelease?: GitHubRelease; semVerLabels?: Map; constructor(args: ArgsType); loadExtendConfig(extend: string): cosmiconfig.Config; loadConfig(): Promise; init(options?: IInitCommandOptions): Promise; createLabels(options?: ICreateLabelsCommandOptions): Promise; label({ pr }?: ILabelCommandOptions): Promise; pr({ dryRun, pr, url, ...options }: IPRCommandOptions): Promise; prCheck({ dryRun, pr, url, ...options }: IPRCheckCommandOptions): Promise; comment({ message, pr, context, dryRun }: ICommentCommandOptions): Promise; version(): Promise; changelog(options?: IChangelogOptions): Promise; release(options: IReleaseOptions): Promise; shipit(options: IShipItCommandOptions): Promise; private getVersion; private getCurrentVersion; private makeChangelog; private makeRelease; private readonly prefixRelease; private createErrorMessage; private setGitUser; private getRepo; private loadPlugins; } export declare function run(args: ArgsType): Promise; export default function main(args: ArgsType): Promise; export { ILogger } from './utils/logger'; export { IPlugin } from './utils/load-plugins'; export { default as SEMVER } from './semver'; export { default as execPromise } from './utils/exec-promise';