import SSH2 from 'ssh2'; import ComponentObjects from '../../component-objects'; import { RemoteScopeNotFound, UnexpectedNetworkError, PermissionDenied, OldClientVersion } from '../exceptions'; import { BitIds, BitId } from '../../../bit-id'; import ComponentNotFound from '../../../scope/exceptions/component-not-found'; import { ScopeDescriptor } from '../../scope'; import ConsumerComponent from '../../../consumer/component'; import { Network } from '../network'; import RemovedObjects from '../../removed-components'; import MergeConflictOnRemote from '../../exceptions/merge-conflict-on-remote'; import { ListScopeResult } from '../../../consumer/component/components-list'; import CustomError from '../../../error/custom-error'; import ExportAnotherOwnerPrivate from '../exceptions/export-another-owner-private'; import DependencyGraph from '../../graph/scope-graph'; import { ComponentLogs } from '../../models/model-component'; export declare type SSHProps = { path: string; username: string; port: number; host: string; }; export declare type SSHConnectionStrategyName = 'token' | 'ssh-agent' | 'ssh-key' | 'user-password' | 'anonymous'; export declare const DEFAULT_STRATEGIES: SSHConnectionStrategyName[]; export declare const DEFAULT_READ_STRATEGIES: SSHConnectionStrategyName[]; export default class SSH implements Network { connection: SSH2 | null | undefined; path: string; username: string; port: number; host: string; _sshUsername?: string; constructor({ path, username, port, host }: SSHProps); connect(strategiesNames?: SSHConnectionStrategyName[]): Promise; _tokenAuthentication(): Promise; _anonymousAuthentication(): Promise; _sshAgentAuthentication(): Promise; _sshKeyAuthentication(): Promise; _userPassAuthentication(): Promise; close(): this; _composeBaseObject(passphrase?: string): { username: string; host: string; port: number; passphrase: string | undefined; readyTimeout: number; }; _composeTokenAuthObject(): Record | null | undefined; _composeAnonymousAuthObject(): Record | null | undefined; _composeUserPassObject(): Promise; _hasAgentSocket(): boolean; _connectWithConfig(sshConfig: Record, authenticationType: string, authFailedMsg: string): Promise; buildCmd(commandName: string, path: string, payload: any, context: any): string; exec(commandName: string, payload?: any, context?: Record): Promise; errorHandler(code: number, err: string): MergeConflictOnRemote | ComponentNotFound | CustomError | RemoteScopeNotFound | PermissionDenied | UnexpectedNetworkError | OldClientVersion | ExportAnotherOwnerPrivate; _unpack(data: any, base64?: boolean): any; pushMany(manyComponentObjects: ComponentObjects[], context?: Record): Promise; deleteMany(ids: string[], force: boolean, context?: Record): Promise; deprecateMany(ids: string[], context?: Record): Promise; undeprecateMany(ids: string[], context?: Record): Promise; push(componentObjects: ComponentObjects): Promise; describeScope(): Promise; list(namespacesUsingWildcards?: string): Promise; latestVersions(componentIds: BitId[]): Promise; search(query: string, reindex: boolean): Promise; show(id: BitId): Promise; log(id: BitId): Promise; graph(bitId?: BitId): Promise; fetch(ids: BitIds, noDeps?: boolean, context?: Record): Promise; }