import type { VSCODE_CAPABILITY_KEY } from './constants.js'; /** * extend WebdriverIO capabilities object */ export interface WDIOVSCodeServiceOptions { [VSCODE_CAPABILITY_KEY]?: VSCodeOptions; } export interface VSCodeCapabilities extends WebdriverIO.Capabilities, WDIOVSCodeServiceOptions { } /** * Settings to handle VSCode Proxy API */ export interface VSCodeProxyOptions { /** * If set to true, the service tries to establish a connection with the * VSCode workbench to enable access to the VSCode API * @default true */ enable: boolean; /** * Port of the WebSocket connection used to connect to the workbench. * By default set to an available port in your operating system. */ port?: number; /** * Timeout for connecting to WebSocket inside of VSCode * @default 5000 */ connectionTimeout?: number; /** * Timeout for command to be executed within VSCode * @default 5000 */ commandTimeout?: number; } /** * Options when testing VSCode web extensions */ export interface ServerOptions { /** * The host name the server is opened on * @default localhost */ hostname: string; /** * The port the server is opened on * @default 3000 */ port: number; } export type ArgsParams = Record; /** * wdio-vscode-service options */ export interface ServiceOptions { /** * Define a cache path to avoid re-downloading VS Code bundles */ cachePath?: string; } export interface BundleInformation { version: string; path: string; } /** * Options to manage VSCode session as part of session capability */ export interface VSCodeOptions { /** * Path to custom VSCode installation */ binary?: string; /** * VSCode version, e.g. 'insiders', 'stable' or '1.66.0' * * @default `stable` */ version?: 'insiders' | 'stable' | string; /** * Define the directory to the extension you want to test * @required */ extensionPath: string; /** * Define custom user settings to be applied to VSCode */ userSettings?: Record; /** * Opens VSCode for a specific workspace */ workspacePath?: string; /** * Opens VSCode with a specific file opened */ filePath?: string; /** * Additional start-up arguments as object, e.g. * ``` * vscodeArgs: { fooBar: true, 'bar-foo': '/foobar' } * ``` * will be passed in as: * ``` * --foo-bar --fooBar --bar-foo=/foobar * ``` */ vscodeArgs?: ArgsParams; /** * If set to true, service logs VSCode output from the extension host * and console API * * @default `true` */ verboseLogging?: boolean; /** * VSCode API proxy configurations */ vscodeProxyOptions?: Partial; /** * Define options when testing VSCode web extensions */ serverOptions?: ServerOptions; /** * Define a custom location for VS Code to store all its data (root for extensionPath, userDataDir etc.) */ storagePath?: string; } export interface WDIOLogs { level: string; message: string; source: string; timestamp: number; } export interface RemoteCommand { id: number; fn: string; params: any[]; } export interface RemoteResponse { id: number; result: any; error?: string; } export type PendingMessageResolver = (error: string | undefined, result: any) => void; export interface WebStandaloneResponse { url: string; name: string; version: string; productVersion: string; hash: string; timestamp: number; sha256hash: string; } export interface TemplateOptions { baseUrl: string; webConfiguration: string; authSession: string; builtinExtensions: string; } export interface Bundle { path: string; vscodeVersion: string; version: string; } //# sourceMappingURL=types.d.ts.map