config.d.ts 656 B

1234567891011121314151617181920212223242526272829303132
  1. export type RecordMate = {
  2. /**
  3. * The hosts that have generated certificate
  4. */
  5. hosts: string[];
  6. /**
  7. * file hash
  8. */
  9. hash?: RecordHash;
  10. };
  11. export type RecordHash = {
  12. key?: string;
  13. cert?: string;
  14. };
  15. export type ConfigOptions = {
  16. savePath: string;
  17. };
  18. declare class Config {
  19. /**
  20. * The mkcert version
  21. */
  22. private version;
  23. private record;
  24. private configFilePath;
  25. constructor({ savePath }: ConfigOptions);
  26. init(): Promise<void>;
  27. private serialize;
  28. merge(obj: Record<string, any>): Promise<void>;
  29. getRecord(): RecordMate;
  30. getVersion(): string;
  31. }
  32. export default Config;