UNPKG

buildstamp

Version:
18 lines (17 loc) 1.01 kB
import { IBuildstamp, IBuildstampOptions, IBuildstampOptionsNormalized, IGitInfo, ICallable } from './interface'; export declare const normalizeOpts: ({ cwd, output, ci, git, date, safe, extra }?: IBuildstampOptions) => IBuildstampOptionsNormalized; export declare const buildstamp: (opts?: IBuildstampOptions) => Promise<IBuildstamp>; export declare const getCommitBranch: (cwd: string, env: Record<string, string | undefined>) => Promise<string>; export declare const getGitInfo: (cwd: string, env: Record<string, string | undefined>) => Promise<IGitInfo>; export declare const getCIInfo: (env: Record<string, string | undefined>) => { ci_run_id: string | undefined; ci_run_url: string | undefined; }; export declare const spawn: (cmd: string, args: ReadonlyArray<string>, cwd: string) => Promise<{ stdout: string; stderr: string; status: number | null; signalCode: string | null; duration: number; }>; export declare const safify: <T extends ICallable>(fn: T, value?: any) => T;