import { noSpecialInitialCommitIndicator } from "../../util.js"; import type { XchangelogConfig, XchangelogSpec } from '@-xun/changelog' with { 'resolution-mode': 'import' }; import type { ProjectMetadata } from '@-xun/project'; export { noSpecialInitialCommitIndicator }; /** * The inline image HTML element appended to links leading to external * repositories. This value is also duplicated in the commit.hbs template file. */ export declare const inlineExternalImageElement: string; /** * The default text that headlines the "breaking changes" section in * the changelog file. */ export declare const noteTitleForBreakingChange = "BREAKING CHANGES"; /** * The preamble prefixed to any generated the changelog file. */ export declare const defaultChangelogTopmatter: string; /** * This regular expression matches well-known xpipeline command strings that may * appear as commands in commit headers and is used to remove said commands so * they do not appear in the changelog. * * Matches against `commandHeaderPattern` should return two matching groups, the * first containing the input string without the command string(s) or a trailing * space and the second containing the command string(s) without its surrounding * brackets or space prefix. * * ### Xpipline commands * * Xpipline commands expand on the [conventional commits * specification](https://www.conventionalcommits.org/en/v1.0.0/#specification) * to include a new "command" structure in addition to "type", "scope", * "description" (alias of "subject"), "header" (combination of type + scope + * description + command), "body", and "footer". * * ```text * [scope][!]: [command] * * [body] * * [footer(s)] * ``` * * #### Expanded specification * * - A command MAY be provided; if provided, it MUST be after the description. * - A header MUST have exactly zero or one commands. * - A command MUST consist of a space followed by an opening bracket ("[") * followed by one or more well-known command strings followed by a closing * bracket ("]"). The closing bracket MUST be the final character of the * header. * - A well-known command string MUST be lowercase alphanumeric and MAY contain * spaces or dashes. It MUST NOT contain any other characters. * - A command MAY consist of one or more well-known command strings. Each * command string beyond the first MUST be separated from the previous * well-known command string by a comma (",") and OPTIONAL space. * * Examples: * * ```text * type(scope): description [skip ci] * ``` * * ```text * type!: description [skip ci, skip cd] * ``` * * ```text * type: subject [skip ci,skip cd] * ``` * * #### Xpipeline footers * * Xpipeline also acknowledges well-known command strings via "xpipeline * footers", which are simply [spec-compliant * footers](https://www.conventionalcommits.org/en/v1.0.0/#specification) of the * form `xpipeline: command string` or `xpipeline: command string 1, command * string 2, etc`, or the `xpipe: ...`/`x: ...`. * * Both commands and footers can be used simultaneously. * * Examples: * * ```text * type(scope): description * * This is a really detailed commit message body. * * xpipeline: skip ci * xpipe: skip cd * x: some-other-command, yet-another-command, a-5th-command * ``` */ export declare const commandHeaderPattern: RegExp; /** * The character(s) used to reference issues by number on GitHub. */ export declare const defaultIssuePrefixes: readonly ["#"]; /** * These are the only conventional commit types supported by symbiote-based * pipelines and are therefore considered "well known". * * Commit types corresponding to entries with `{ hidden: false }` will appear in * the generated the changelog file. Commit types with `{ hidden: true }` will * not appear in the changelog file _unless the commit is marked "BREAKING" in * some way_. * * Multiple commit types can have the same `section`, which means commits of * that type will be combined together under said section. * * Note that the order of values in this array is significant. Commits, having * been grouped (sectioned) by type, will appear in the changelog in the order * they appear in this array. Unknown types, i.e. types that are not listed in * `wellKnownCommitTypes`, will appear _after_ any well-known sections if they * are set to appear at all (e.g. if they are marked as breaking changes). * * Also note that `@-xun/changelog` has internal lists of "well-known commit * types" (conventional, angular, etc) that this type will be merged on top of; * the implication being: not overwriting an internal type's configuration can * lead to that type (feat, fix, ci) being included even if it is not present in * the below array. * * Valid commit types are alphanumeric and may contain an underscore (`_`) or dash * (`-`). **Using characters other than these will lead to undefined behavior.** */ export declare const wellKnownCommitTypes: NonNullable; /** * Handlebars template data (not processed by our custom configuration). */ export declare const defaultTemplates: { commit: string; footer: string; header: string; template: string; partials: { owner: string; host: string; repository: string; }; }; /** * @see {@link assertEnvironment} */ export declare const transformer: import("../../assets.js").Transformer; /** * @see {@link moduleExport} */ export declare function assertEnvironment(): Omit[0], 'configOverrides'>; /** * This function returns a `@-xun/changelog` configuration preset. See the * documentation for details. * * `configOverrides`, if an object or undefined, is recursively merged into a * partially initialized {@link XchangelogConfig} object (overwriting same keys) * using `lodash.mergeWith`. * * If `configOverrides` is a function, it will be passed said partially * initialized {@link XchangelogConfig} object and must return an object of the * same type. * * If you are consuming this configuration object with the intent to invoke * `@-xun/changelog` directly (i.e. via its Node.js API), such as in the * `src/commands/build/changelog.ts` file, **you should call * {@link patchSpawnChild} as soon as possible** upon entering the handler and * call {@link unpatchSpawnChild} towards the end of the same scope. * * This function also relies on a patched version of the global `Proxy` class so * that it returns the object its proxying as a property on the proxy object * accessible via the {@link $proxiedTarget} symbol. This is used to hack our * way around some questionable attempts at implementing immutable commit * objects in upstream conventional-commits-writer. */ export declare function moduleExport({ configOverrides, specialInitialCommit, projectMetadata }: { configOverrides: ((config: XchangelogConfig) => XchangelogConfig) | Partial; specialInitialCommit: string; projectMetadata: ProjectMetadata; }): XchangelogConfig;