local-cache.d.ts 1.1 KB

12345678910111213141516171819202122232425
  1. import { EngineType } from './types';
  2. import { CustomError } from '../../../../../lib/errors';
  3. export declare const LOCAL_POLICY_ENGINE_DIR = ".iac-data";
  4. export declare const CUSTOM_POLICY_ENGINE_WASM_PATH: string;
  5. export declare function assertNever(value: never): never;
  6. export declare function getLocalCachePath(engineType: EngineType): string[];
  7. export declare function initLocalCache({ customRulesPath, }?: {
  8. customRulesPath?: string;
  9. }): Promise<void>;
  10. export declare function cleanLocalCache(): void;
  11. export declare class FailedToInitLocalCacheError extends CustomError {
  12. constructor(message?: string);
  13. }
  14. export declare class FailedToDownloadRulesError extends CustomError {
  15. constructor(message?: string);
  16. }
  17. export declare class FailedToExtractCustomRulesError extends CustomError {
  18. constructor(path: string, message?: string);
  19. }
  20. export declare class InvalidCustomRules extends CustomError {
  21. constructor(path: string, message?: string);
  22. }
  23. export declare class InvalidCustomRulesPath extends CustomError {
  24. constructor(path: string, message?: string);
  25. }