UNPKG

@tufjs/repo-mock

Version:
26 lines (25 loc) 938 B
import { TUFHandlerOptions } from './handler'; import { Target } from './shared.types'; export { tufHandlers } from './handler'; export { initializeTUFRepo } from './repo'; export type { Target } from './shared.types'; export type { TUFHandlerOptions } from './handler'; export type { TUFRepo } from './repo'; type MockRepoOptions = { baseURL?: string; cachePath?: string; } & TUFHandlerOptions; export declare function mockRepo(baseURL: string, targets: Target[], options?: TUFHandlerOptions): string; export declare function clearMock(): void; declare class Scope { private readonly targets; private readonly options; readonly baseURL: string; readonly cachePath: string; constructor(targets: Target[], options?: MockRepoOptions); reset(): void; teardown(): void; private setup; } declare const _default: (targets: Target | Target[], options?: MockRepoOptions) => Scope; export default _default;