初始化

This commit is contained in:
2025-07-30 13:39:32 +08:00
commit d1f2452b28
253 changed files with 32087 additions and 0 deletions

7
typings/appium-base-driver/index.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import { DeviceSettings } from './lib/basedriver/device-settings';
export class server {}
export class BaseDriver {}
export { DeviceSettings };

View File

@@ -0,0 +1,8 @@
export class DeviceSettings {
constructor(
defaultSettings: Record<string, any>,
onSettingsUpdate?: (name: string, newValue: any, oldValue: any) => Promise<void>,
);
public update(newSettings: Record<string, any>): Promise<void>;
public getSettings(): Record<string, any>;
}

View File

@@ -0,0 +1,9 @@
export class Duration {}
export class Timer {
get startTime(): number;
public start(): Timer;
getDuration(): Duration;
}
export default Timer;

5
typings/appium-support/index.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
import * as timing from './build/lib/timing';
export { timing };
// export default { Timer };

View File

@@ -0,0 +1,13 @@
declare class DeviceConnectionsFactory {
listConnections (udid?: string | null, port?: string | null, strict?: boolean): string[];
requestConnection(
udid: string,
port: number,
options: { usePortForwarding?: boolean; devicePort?: number },
): Promise<void>;
releaseConnection(udid: string | null, port: number | null): void;
}
declare const DEVICE_CONNECTIONS_FACTORY: DeviceConnectionsFactory;
export { DEVICE_CONNECTIONS_FACTORY, DeviceConnectionsFactory };
export default DEVICE_CONNECTIONS_FACTORY;

View File

@@ -0,0 +1,33 @@
import { BaseDriver } from 'appium-base-driver';
declare interface ScreenInfo {
statusBarSize: { width: number; height: number };
scale: number;
}
declare interface Gesture {
action: string;
options: {
x?: number;
y?: number;
ms?: number;
};
}
declare class XCUITestDriver extends BaseDriver {
constructor(opts: Record<string, any>, shouldValidateCaps: boolean);
public createSession(...args: any): Promise<any>;
public findElement(strategy: string, selector: string): Promise<any>;
public getSize(element: any): Promise<{ width: number; height: number } | undefined>;
public getScreenInfo(): Promise<ScreenInfo>;
public performTouch(gestures: Gesture[]): Promise<any>;
public mobilePressButton(args: { name: string }): Promise<any>;
public stop(): Promise<void>;
public deleteSession(): Promise<void>;
public updateSettings(opts: any): Promise<void>;
public keys(value: string): Promise<void>;
public wda: any;
}
export default XCUITestDriver;
export { XCUITestDriver };

View File

@@ -0,0 +1,9 @@
import { Server as HttpServer } from 'http';
import { XCUITestDriver } from './driver';
export class Server extends HttpServer {
public driver: XCUITestDriver;
}
export function startServer(port: string | number, address?: string): Server;

View File

@@ -0,0 +1,5 @@
import { XCUITestDriver } from './build/lib/driver';
import { startServer } from './build/lib/server';
export { XCUITestDriver, startServer };
export default XCUITestDriver;

1
typings/build-config.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
declare var __PATHNAME__: string;

4
typings/custom_png.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
declare module '*.png' {
const content: any;
export default content;
}

4
typings/custom_svg.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
declare module '*.svg' {
const content: any;
export default content;
}

10
typings/node-mjpeg-proxy/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
import { Request, Response } from 'express';
import { EventEmitter } from 'events';
declare class MjpegProxy extends EventEmitter {
constructor(mjpegUrl: string);
proxyRequest(req: Request, res: Response): void;
}
export = MjpegProxy;

1
typings/tinyh264.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export const init: () => void;

10
typings/worker-loader.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
declare module 'worker-loader!*' {
// You need to change `Worker`, if you specified a different value for the `workerType` option
class WebpackWorker extends Worker {
constructor();
}
// Uncomment this if you set the `esModule` option to `false`
// export = WebpackWorker;
export default WebpackWorker;
}