1 | import { Project } from "./project/project";
|
2 | import { GitHubAppCredential, GitHubCredential } from "./secrets";
|
3 | export interface CloneOptions {
|
4 | |
5 |
|
6 |
|
7 |
|
8 |
|
9 | keep?: boolean;
|
10 | |
11 |
|
12 |
|
13 |
|
14 |
|
15 | alwaysDeep?: boolean;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | noSingleBranch?: boolean;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | depth?: number;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | detachHead?: boolean;
|
34 | |
35 |
|
36 |
|
37 | path?: string;
|
38 | |
39 |
|
40 |
|
41 |
|
42 | symLinks?: boolean;
|
43 | }
|
44 | export declare function gitHubComRepository(details: {
|
45 | owner: string;
|
46 | repo: string;
|
47 | branch?: string;
|
48 | sha?: string;
|
49 | credential: GitHubCredential | GitHubAppCredential;
|
50 | }): AuthenticatedRepositoryId<GitHubCredential | GitHubAppCredential>;
|
51 | export declare enum RepositoryProviderType {
|
52 | GitHubCom = 0,
|
53 | GitHubEnterprise = 1
|
54 | }
|
55 | export interface RepositoryId {
|
56 | owner: string;
|
57 | repo: string;
|
58 | branch?: string;
|
59 | sha?: string;
|
60 | type: RepositoryProviderType;
|
61 | apiUrl?: string;
|
62 | gitUrl?: string;
|
63 | }
|
64 | export interface AuthenticatedRepositoryId<T> extends RepositoryId {
|
65 | credential: T;
|
66 | cloneUrl(): string;
|
67 | }
|
68 | export interface ProjectLoader {
|
69 | load<C>(id: AuthenticatedRepositoryId<C>, baseDir: string): Promise<Project<C>>;
|
70 | clone<C>(id: AuthenticatedRepositoryId<C>, options?: CloneOptions): Promise<Project<C>>;
|
71 | }
|
72 | export declare function createProjectLoader(): ProjectLoader;
|
73 | export declare class DefaultProjectLoader implements ProjectLoader {
|
74 | load(id: AuthenticatedRepositoryId<any>, baseDir: string): Promise<Project>;
|
75 | clone(id: AuthenticatedRepositoryId<any>, options?: CloneOptions): Promise<Project>;
|
76 | }
|
77 |
|
\ | No newline at end of file |