git-documentdb
Version:
Offline-first database that syncs with Git
78 lines • 2.43 kB
TypeScript
import { Logger } from 'tslog';
import { RemoteOptions } from '../types';
/**
* RemoteEngine
*
* @public
*/
export declare const RemoteEngine: {
[key: string]: RemoteEngineInterface;
};
/**
* RemoteEngineInterface
*
* @internal
*/
export interface RemoteEngineInterface {
type: string;
name: string;
checkFetch: (workingDir: string, options: RemoteOptions, remoteName?: string, logger?: Logger) => Promise<boolean>;
fetch: (workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, localBranchName?: string, remoteBranchName?: string, logger?: Logger) => Promise<void>;
push: (workingDir: string, remoteOptions: RemoteOptions, remoteName?: string, localBranch?: string, remoteBranch?: string, logger?: Logger) => Promise<void>;
clone: (workingDir: string, remoteOptions: RemoteOptions, remoteName: string, logger?: Logger) => Promise<void>;
}
declare class BaseError extends Error {
constructor(e: string);
}
/**
* RemoteError
*
* @public
*/
export declare namespace RemoteErr {
/**
* @privateRemarks
* Copy error message from parent
*/
class CannotConnectError extends BaseError {
constructor(mes: unknown);
}
class HTTPError401AuthorizationRequired extends BaseError {
constructor(mes: unknown);
}
class HTTPError403Forbidden extends BaseError {
constructor(mes: unknown);
}
class HTTPError404NotFound extends BaseError {
constructor(mes: unknown);
}
class InvalidAuthenticationTypeError extends BaseError {
constructor(mes: unknown);
}
class InvalidGitRemoteError extends BaseError {
constructor(mes: unknown);
}
class InvalidRepositoryURLError extends BaseError {
constructor(mes: unknown);
}
class InvalidSSHKeyPathError extends BaseError {
constructor(mes: unknown);
}
class InvalidURLFormatError extends BaseError {
constructor(mes: unknown);
}
class NetworkError extends BaseError {
constructor(mes: unknown);
}
class UnfetchedCommitExistsError extends BaseError {
constructor(mes: unknown);
}
}
/**
* wrappingRemoteEngineError
*
* @internal
*/
export declare function wrappingRemoteEngineError(remoteEngineError: BaseError): Error;
export {};
//# sourceMappingURL=remote_engine.d.ts.map