source.d.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. export type SourceInfo = {
  2. version: string;
  3. downloadUrl: string;
  4. };
  5. export declare abstract class BaseSource {
  6. abstract getSourceInfo(): Promise<SourceInfo | undefined>;
  7. protected getPlatformIdentifier(): string;
  8. }
  9. /**
  10. * Download mkcert from github.com
  11. */
  12. export declare class GithubSource extends BaseSource {
  13. static create(): GithubSource;
  14. private constructor();
  15. getSourceInfo(): Promise<SourceInfo | undefined>;
  16. }
  17. /**
  18. * Download mkcert from coding.net
  19. *
  20. * @see https://help.coding.net/openapi
  21. */
  22. export declare class CodingSource extends BaseSource {
  23. static CODING_API: string;
  24. static CODING_AUTHORIZATION: string;
  25. static CODING_PROJECT_ID: number;
  26. static REPOSITORY: string;
  27. static create(): CodingSource;
  28. private constructor();
  29. private request;
  30. /**
  31. * Get filename of Coding.net artifacts
  32. *
  33. * @see https://liuweigl.coding.net/p/github/artifacts/885241/generic/packages
  34. *
  35. * @returns name
  36. */
  37. private getPackageName;
  38. getSourceInfo(): Promise<SourceInfo | undefined>;
  39. }