UNPKG

@cz-git/loader

Version:
44 lines (41 loc) 1.23 kB
import * as cosmiconfig_dist_types from 'cosmiconfig/dist/types'; import { RulesConfig } from '@commitlint/types'; interface CommitlintOptions { rules?: Partial<RulesConfig>; prompt?: any; } interface LoaderOptions { moduleName: string; cwd?: string; stopDir?: string; explicitPath?: string; searchPlaces?: string[]; packageProp?: string[]; } declare function loader(options: LoaderOptions): Promise<{ config: cosmiconfig_dist_types.Config; filepath: string; isEmpty?: boolean; } | null>; declare function clLoader(cwd?: string): Promise<CommitlintOptions>; declare function czLoader(cwd?: string): Promise<any>; declare function aiLoader(): Promise<{ openAIToken: any; apiEndpoint: any; apiProxy: any; apiModel: any; }>; interface UserOptions { /** Debug mode path */ cwd?: string; /** Directly specify the configuration path */ configPath?: string; } /** * Entry Fn: Loading both commitizen and commitlint configurations */ declare function configLoader(options?: UserOptions): Promise<{ prompt: any; rules?: Partial<RulesConfig>; }>; export { type LoaderOptions, type UserOptions, aiLoader, clLoader, configLoader, czLoader, loader };