git-documentdb-plugin-remote-nodegit
Version:
GitDocumentDB plugin for remote connection using NodeGit
105 lines • 3.79 kB
TypeScript
/**
* GitDocumentDB plugin for remote connection using NodeGit
* Copyright (c) Hidekazu Kubota
*
* This source code is licensed under the Mozilla Public License Version 2.0
* found in the LICENSE file in the root directory of this source tree.
*/
import { Logger } from 'tslog';
import { RemoteOptions } from './types';
/**
* @internal
*/
export declare function sleep(msec: number): Promise<unknown>;
/**
* @public
*/
export declare const type = "remote";
/**
* @public
*/
export declare const name = "nodegit";
/**
* Clone
*
* @throws {@link InvalidURLFormatError}
* @throws {@link NetworkError}
* @throws {@link HTTPError401AuthorizationRequired}
* @throws {@link HTTPError404NotFound}
* @throws {@link CannotConnectError}
*
* @throws {@link HttpProtocolRequiredError} (from createCredentialForGitHub)
* @throws {@link InvalidRepositoryURLError} (from createCredentialForGitHub)
* @throws {@link InvalidSSHKeyPathError} (from createCredentialForSSH)
*
* @throws {@link InvalidAuthenticationTypeError} (from createCredential)
*/
export declare function clone(workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, logger?: Logger): Promise<void>;
/**
* Check connection by FETCH
*
* @throws {@link InvalidGitRemoteError}
* @throws {@link InvalidURLFormatError}
* @throws {@link NetworkError}
* @throws {@link HTTPError401AuthorizationRequired}
* @throws {@link HTTPError404NotFound}
* @throws {@link CannotConnectError}
*
* @throws {@link HttpProtocolRequiredError} (from createCredentialForGitHub)
* @throws {@link InvalidRepositoryURLError} (from createCredentialForGitHub)
* @throws {@link InvalidSSHKeyPathError} (from createCredentialForSSH)
*
* @throws {@link InvalidAuthenticationTypeError} (from createCredential)
*
* @public
*/
export declare function checkFetch(workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, logger?: Logger): Promise<boolean>;
/**
* git fetch
*
* @throws {@link InvalidGitRemoteError}
* @throws {@link InvalidURLFormatError}
* @throws {@link NetworkError}
* @throws {@link HTTPError401AuthorizationRequired}
* @throws {@link HTTPError404NotFound}
* @throws {@link CannotConnectError}
*
* @throws {@link HttpProtocolRequiredError} (from createCredentialForGitHub)
* @throws {@link InvalidRepositoryURLError} (from createCredentialForGitHub)
* @throws {@link InvalidSSHKeyPathError} (from createCredentialForSSH)
*
* @throws {@link InvalidAuthenticationTypeError} (from createCredential)
*
* @public
*/
export declare function fetch(workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, localBranchName?: string, remoteBranchName?: string, logger?: Logger): Promise<void>;
/**
* git push
*
* @throws {@link InvalidGitRemoteError}
* @throws {@link UnfetchedCommitExistsError}
* @throws {@link InvalidURLFormatError}
* @throws {@link NetworkError}
* @throws {@link HTTPError401AuthorizationRequired}
* @throws {@link HTTPError404NotFound}
* @throws {@link HTTPError403Forbidden}
* @throws {@link CannotConnectError}
*
* @throws # Errors from validatePushResult
* @throws - {@link UnfetchedCommitExistsError}
* @throws - {@link CannotConnectError}
*
* @throws # Errors from createCredentialForGitHub
* @throws - {@link InvalidURLFormatError}
* @throws - {@link InvalidRepositoryURLError}
*
* @throws # Errors from createCredentialForSSH
* @throws - {@link InvalidSSHKeyPathError}
*
* @throws # Errors from createCredential
* @throws - {@link InvalidAuthenticationTypeError}
*
* @public
*/
export declare function push(workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, localBranchName?: string, remoteBranchName?: string, logger?: Logger): Promise<void>;
//# sourceMappingURL=remote-nodegit.d.ts.map