import type { CommitKnownProps, CommitGroup, NoteGroup, TransformedCommit } from './commit.js'; export type HeaderPartialFunction = (context: FinalTemplateContext) => string; export type PreamblePartialFunction = (context: FinalTemplateContext) => string; export type CommitPartialFunction = (context: FinalTemplateContext, commit: TransformedCommit) => string; export type FooterPartialFunction = (context: FinalTemplateContext) => string; export interface TemplateContext { /** * Version number of the upcoming release. * If `version` is found in the last commit before generating logs, it will be overwritten. */ version?: string; /** * Is this a patch release? */ isPatch?: boolean; /** * The title of the release. */ title?: string; /** * The release date. */ date?: string; /** * Introductory text rendered after the release header. */ preamble?: string; /** * Should all references be linked? */ linkReferences?: boolean; /** * Commit base url path. */ commit?: string; /** * Issue base url. */ issue?: string; /** * Release comparison base url path. */ compare?: string; /** * Repository name. * Eg: `'conventional-changelog-writer'` */ repository?: string; /** * Repository host. * Eg: `'https://github.com'` or `'https://bitbucket.org'` */ host?: string; /** * Repository owner. * Eg: `'conventional-changelog'` */ owner?: string; /** * Full repository url. * Eg: `'https://github.com/conventional-changelog/conventional-changelog-writer'`. * Should be used as a fallback when `context.repository` doesn't exist. */ repoUrl?: string; /** * Commit groups. */ commitGroups?: CommitGroup[]; /** * Note groups. */ noteGroups?: NoteGroup[]; /** * Previous release tag. */ previousTag?: string | null; /** * Current release tag. */ currentTag?: string | null; /** * Add a link to compare changes. */ linkCompare?: boolean; /** * Function that renders the release header. */ headerPartial?: HeaderPartialFunction; /** * Function that renders introductory text after the release header. */ preamblePartial?: PreamblePartialFunction; /** * Function that renders a single commit entry. */ commitPartial?: CommitPartialFunction; /** * Function that renders release footer notes. */ footerPartial?: FooterPartialFunction; } type RequiredTemplateContext = Required>; export interface FinalTemplateContext extends TemplateContext { commit: RequiredTemplateContext['commit']; issue: RequiredTemplateContext['issue']; date: RequiredTemplateContext['date']; headerPartial: RequiredTemplateContext['headerPartial']; preamblePartial: RequiredTemplateContext['preamblePartial']; commitPartial: RequiredTemplateContext['commitPartial']; footerPartial: RequiredTemplateContext['footerPartial']; } export {}; //# sourceMappingURL=context.d.ts.map