1import type { Gez } from './gez';
2export interface PackConfig {
3 /**
4 * 是否启用归档
5 */
6 enable?: boolean;
7 /**
8 * 输出的文件
9 */
10 outputs?: string | string[] | boolean;
11 /**
12 * 发布的类型
13 * 环境变量设置:process.env.RELEASE_TYPE
14 */
15 releaseType?: 'major' | 'premajor' | 'minor' | 'preminor' | 'patch' | 'prepatch' | 'prerelease';
16 packageJson?: (gez: Gez, pkgJson: Record<string, any>) => Promise<Record<string, any>>;
17 onBefore?: (gez: Gez, pkgJson: Record<string, any>) => Promise<void>;
18 onAfter?: (gez: Gez, pkgJson: Record<string, any>, file: Buffer) => Promise<void>;
19}
20export interface ParsedPackConfig {
21 enable: boolean;
22 outputs: string[];
23 packageJson: (gez: Gez, pkgJson: Record<string, any>) => Promise<Record<string, any>>;
24 onBefore: (gez: Gez, pkgJson: Record<string, any>) => Promise<void>;
25 onAfter: (gez: Gez, pkgJson: Record<string, any>, file: Buffer) => Promise<void>;
26}
27export declare function parsePackConfig(config?: PackConfig): ParsedPackConfig;