move RemoteSourceProvider to git api

This commit is contained in:
João Moreno
2020-04-17 16:34:22 +02:00
parent aeeec54c8e
commit 675ed02c1f
4 changed files with 38 additions and 32 deletions

View File

@@ -3,7 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Uri, SourceControlInputBox, Event, CancellationToken } from 'vscode';
import { Uri, Event, Disposable, ProviderResult } from 'vscode';
export { ProviderResult } from 'vscode';
export interface Git {
readonly path: string;
@@ -189,6 +190,17 @@ export interface Repository {
commit(message: string, opts?: CommitOptions): Promise<void>;
}
export interface RemoteSource {
readonly name: string;
readonly url: string;
}
export interface RemoteSourceProvider {
readonly name: string;
readonly supportsQuery?: boolean;
getRemoteSources(query?: string): ProviderResult<RemoteSource[]>;
}
export type APIState = 'uninitialized' | 'initialized';
export interface API {
@@ -201,6 +213,7 @@ export interface API {
toGitUri(uri: Uri, ref: string): Uri;
getRepository(uri: Uri): Repository | null;
registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable;
}
export interface GitExtension {