import * as BrowserstackLocalLauncher from 'browserstack-local'; import type { Capabilities, Services, Options } from '@wdio/types'; import type { BrowserstackConfig, App, AppConfig, AppUploadResponse, UserConfig, BrowserstackOptions } from './types.js'; type BrowserstackLocal = BrowserstackLocalLauncher.Local & { pid?: number; stop(callback: (err?: Error) => void): void; }; export default class BrowserstackLauncherService implements Services.ServiceInstance { private _options; private _config; browserstackLocal?: BrowserstackLocal; private _buildName?; private _projectName?; private _buildTag?; private _buildIdentifier?; private _accessibilityAutomation?; private _percy?; private _percyBestPlatformCaps?; private readonly browserStackConfig; constructor(_options: BrowserstackConfig & BrowserstackOptions, capabilities: Capabilities.RemoteCapability, _config: Options.Testrunner); /** * SDK-7075: BROWSERSTACK_PROJECT_NAME / BROWSERSTACK_BUILD_NAME take precedence over the * config file, as every other SDK and the binary's own env->config map already do. They are * written back into the caps so the session itself carries them: into bstack:options for W3C * caps (including one this constructor just created), and into the top-level project/build * keys that legacy caps name a build with - added on a BrowserStack session that has no * bstack:options, otherwise only overwritten where already present. Blank values are ignored. * Returns the values applied, for the Test Reporting fields - none for the caps of a * non-BrowserStack session, which are left untouched so the reported names match the session. */ private _applyEnvBuildNames; onWorkerStart(cid: any, caps: any): Promise; onPrepare(config: Options.Testrunner, capabilities: Capabilities.RemoteCapabilities): Promise; onComplete(): Promise; setupPercy(options: BrowserstackConfig & Options.Testrunner, config: Options.Testrunner, bsConfig: UserConfig): Promise; stopPercy(): Promise; _uploadApp(app: App): Promise; /** * @param {String | AppConfig} appConfig : should be "app file path" or "app_url" or "custom_id" or "shareable_id". * : only "path" and "custom_id" should coexist as multiple properties. */ _validateApp(appConfig: AppConfig | string): Promise; _uploadServiceLogs(): Promise; private _removeCliOnlyCapabilityOptions; _updateObjectTypeCaps(capabilities?: Capabilities.RemoteCapabilities, capType?: string, value?: { [key: string]: any; }): void; /** * The runner schedules workers after onPrepare from each capability's maxInstances and * config.maxInstances, so a server parallelsPerPlatform is mapped onto them here, and server * platforms onto the capability at the same index. Platforms the server appends have no * capability and stay inert. */ _applyServerConfigToRunner(config: Options.Testrunner, capabilities: Capabilities.RemoteCapabilities): void; _updateCaps(capabilities?: Capabilities.RemoteCapabilities, capType?: string, value?: string): void; _updateBrowserStackPercyConfig(): void; _handleBuildIdentifier(capabilities?: Capabilities.RemoteCapabilities): void; /** * @return {string} if buildName doesn't exist in json file, it will return 1 * else returns corresponding value in json file (e.g. { "wdio-build": { "identifier" : 2 } } => 2 in this case) */ _getLocalBuildNumber(): string | null; _updateLocalBuildCache(filePath?: string, buildName?: string, buildIdentifier?: number): void; _getClientBuildUuid(): string; } export {}; //# sourceMappingURL=launcher.d.ts.map