@codefresh-io/cf-git-providers
Version:
An NPM module/CLI for interacting with various git providers
30 lines • 1.46 kB
TypeScript
import { GitAuth } from '../providers/types';
export declare const to: (fn: any) => Promise<any[]>;
export declare const errormsg: (msg: TemplateStringsArray | string) => string;
export declare const exitWithError: (msg: TemplateStringsArray | string) => never;
export declare const parseGitContext: (gitContextStr: string) => any;
interface Logger {
info: (msg: any) => void;
warn: (msg: any) => void;
debug: (msg: any) => void;
error: (msg: any) => void;
}
export declare const createNewLogger: (namespace: string) => Logger;
export declare const writeResultsToFile: (fileName: string, data: string) => Promise<void>;
export declare const createProgress: (resourceName: string, total: number, refreshMs?: number) => {
tick: (n?: number) => void;
};
export declare const assertPatWritePermission: (url: string, auth: GitAuth) => Promise<void>;
export declare const cleanEncodedFilePath: (filepath: string, { preserveSlashes }?: {
preserveSlashes?: boolean | undefined;
}) => string;
export declare const cleanUrlPrefix: (url: string) => string;
export declare const isJsonString: (str: any) => boolean;
export declare const hashToken: (token: string) => string;
export declare class RateLimitManager {
private static tokenResetMemory;
static set(token: string, resetTime: number): void;
static assert(token: string, requestErrorFunc: (resetTime: number) => Error): void;
}
export {};
//# sourceMappingURL=index.d.ts.map