UNPKG

@theintern/digdug

Version:

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

57 lines (56 loc) 2.19 kB
/// <reference types="node" /> import Tunnel, { TunnelProperties, DownloadOptions, ChildExecutor, NormalizedEnvironment } from './Tunnel'; import { JobState } from './interfaces'; import { CancellablePromise } from '@theintern/common'; import { Url } from 'url'; export default class SauceLabsTunnel extends Tunnel implements SauceLabsProperties { accessKey: string; directDomains: string[]; tunnelDomains: string[]; domainAuthentication: string[]; fastFailDomains: string[]; isSharedTunnel: boolean; logFile: string | undefined; pacFile: string | undefined; pidFile: string | undefined; logFileSize: number | undefined; logTrafficStats: number; restUrl: string | undefined; skipSslDomains: string[]; squidOptions: string | undefined; useProxyForTunnel: boolean; vmVersion: string | undefined; scVersion: string; username: string; constructor(options?: SauceLabsOptions); get auth(): string; get executable(): string; get extraCapabilities(): any; get isDownloaded(): boolean; get url(): string; protected _postDownloadFile(data: Buffer, options?: DownloadOptions): Promise<void>; protected _makeNativeArgs(proxy?: Url): string[]; protected _makeJavaArgs(proxy?: Url): string[]; protected _makeArgs(readyFile: string): string[]; sendJobState(jobId: string, data: JobState): CancellablePromise<void>; protected _start(executor: ChildExecutor): CancellablePromise<any>; protected _normalizeEnvironment(environment: any): NormalizedEnvironment; } export interface SauceLabsProperties extends TunnelProperties { directDomains: string[]; tunnelDomains: string[]; domainAuthentication: string[]; fastFailDomains: string[]; isSharedTunnel: boolean; logFile: string | undefined; pacFile: string | undefined; pidFile: string | undefined; logFileSize: number | undefined; logTrafficStats: number; restUrl: string | undefined; skipSslDomains: string[]; squidOptions: string | undefined; useProxyForTunnel: boolean; vmVersion: string | undefined; } export declare type SauceLabsOptions = Partial<SauceLabsProperties>;