client.d.ts 626 B

1234567891011121314151617181920212223
  1. import type { MakeFetchHappenOptions } from 'make-fetch-happen';
  2. export type Retry = MakeFetchHappenOptions['retry'];
  3. type FetchOptions = {
  4. retry?: Retry;
  5. timeout?: number;
  6. };
  7. export type TUFOptions = {
  8. cachePath: string;
  9. mirrorURL: string;
  10. rootPath?: string;
  11. forceCache: boolean;
  12. forceInit: boolean;
  13. } & FetchOptions;
  14. export interface TUF {
  15. getTarget(targetName: string): Promise<string>;
  16. }
  17. export declare class TUFClient implements TUF {
  18. private updater;
  19. constructor(options: TUFOptions);
  20. refresh(): Promise<void>;
  21. getTarget(targetName: string): Promise<string>;
  22. }
  23. export {};