UNPKG

@theintern/digdug

Version:

Dig Dug. A simple abstraction library for downloading and launching WebDriver service tunnels.

34 lines (33 loc) 1.43 kB
/// <reference types="node" /> import { CancellablePromise } from '@theintern/common'; import Tunnel, { TunnelProperties, DownloadOptions, ChildExecutor, NormalizedEnvironment } from './Tunnel'; import { Url } from 'url'; import { JobState } from './interfaces'; export default class BrowserStackTunnel extends Tunnel implements BrowserStackProperties { automateOnly: true; environmentUrl: string; killOtherTunnels: boolean; servers: (Url | string)[]; skipServerValidation: boolean; forceLocal: boolean; constructor(options?: BrowserStackOptions); get auth(): string; get executable(): string; get extraCapabilities(): Object; get url(): string; protected _postDownloadFile(data: Buffer, options?: DownloadOptions): Promise<void>; protected _makeArgs(..._values: string[]): string[]; sendJobState(jobId: string, data: JobState): CancellablePromise<void>; protected _start(executor: ChildExecutor): CancellablePromise<any>; protected _stop(): Promise<number | undefined>; protected _normalizeEnvironment(environment: any): NormalizedEnvironment; } export interface BrowserStackProperties extends TunnelProperties { automateOnly: true; killOtherTunnels: boolean; servers: (Url | string)[]; skipServerValidation: boolean; forceLocal: boolean; environmentUrl: string; } export declare type BrowserStackOptions = Partial<BrowserStackProperties>;