@directctrl/fixturelibrary
Version:
Utility library making it easy to work with the open-fixture-library.
28 lines (27 loc) • 958 B
TypeScript
import { Fixture } from './types';
export declare function request(url: string): Promise<object | void>;
export declare function fetchLatestSupportedCommit(forceUpdate?: boolean): Promise<string | undefined>;
export declare function githubRawFixtureRequest(path: string): Promise<object | void>;
export declare class TruncatedDataError extends Error {
constructor(message: string);
}
/**
* @internal
* Fetching and filtering a list of all fixtures of ofl.
* @returns List of all fixtures in the Open Fixture Library
* @throws TruncatedDataError if the list is to long
*/
export declare function fetchOflFixtureDirectory(): Promise<{
path: string;
sha: string;
url: string;
}[] | undefined>;
/**
* Fetching a Github blob of a Fixture definition
* @param sha sha of the blob
* @returns sha and parsed fixture definition
*/
export declare function getFixtureGithubBlob(sha: string): Promise<{
sha: string;
content: Fixture;
}>;