appium-remote-debugger 15.2.14 → 15.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/types.ts CHANGED
@@ -79,6 +79,33 @@ interface RemoteDebuggerRealDeviceSpecificOptions {
79
79
 
80
80
  export type RemoteDebuggerRealDeviceOptions = RemoteDebuggerRealDeviceSpecificOptions & RemoteDebuggerOptions;
81
81
 
82
+ /**
83
+ * Options for configuring an RpcClient instance.
84
+ */
85
+ export interface RpcClientOptions {
86
+ bundleId?: string;
87
+ platformVersion?: string;
88
+ isSafari?: boolean;
89
+ logAllCommunication?: boolean;
90
+ logAllCommunicationHexDump?: boolean;
91
+ webInspectorMaxFrameLength?: number;
92
+ socketChunkSize?: number;
93
+ fullPageInitialization?: boolean;
94
+ pageLoadTimeoutMs?: number;
95
+ udid?: string;
96
+ targetCreationTimeoutMs?: number;
97
+ }
98
+
99
+ /**
100
+ * Options specific to RpcClientSimulator.
101
+ */
102
+ export interface RpcClientSimulatorOptions {
103
+ socketPath?: string;
104
+ host?: string;
105
+ port?: number;
106
+ messageProxy?: any;
107
+ }
108
+
82
109
  export type AppIdKey = string | number;
83
110
  export type PageIdKey = string | number;
84
111
  export type TargetId = string;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "appium"
6
6
  ],
7
- "version": "15.2.14",
7
+ "version": "15.3.0",
8
8
  "author": "Appium Contributors",
9
9
  "license": "Apache-2.0",
10
10
  "repository": {
@@ -1,64 +0,0 @@
1
- import { log } from '../logger';
2
- import { RpcClient } from './rpc-client';
3
- import { services } from 'appium-ios-device';
4
-
5
-
6
- export class RpcClientRealDevice extends RpcClient {
7
- /**
8
- * @param {import('./rpc-client').RpcClientOptions} [opts={}]
9
- */
10
- constructor (opts = {}) {
11
- super(opts);
12
- }
13
-
14
- /**
15
- * @override
16
- */
17
- async connect () {
18
- this.service = await services.startWebInspectorService(this.udid, {
19
- osVersion: this.platformVersion,
20
- isSimulator: false,
21
- verbose: this.logAllCommunication,
22
- verboseHexDump: this.logAllCommunicationHexDump,
23
- socketChunkSize: this.socketChunkSize,
24
- maxFrameLength: this.webInspectorMaxFrameLength,
25
- });
26
-
27
- this.service.listenMessage(this.receive.bind(this));
28
- this.isConnected = true;
29
- }
30
-
31
- /**
32
- * @override
33
- */
34
- async disconnect () {
35
- if (!this.isConnected) {
36
- return;
37
- }
38
-
39
- log.debug('Disconnecting from remote debugger');
40
- await super.disconnect();
41
- this.service.close();
42
- this.isConnected = false;
43
- }
44
-
45
- /**
46
- * @override
47
- */
48
- async sendMessage (cmd) {
49
- this.service.sendMessage(cmd);
50
- }
51
-
52
- /**
53
- * @override
54
- */
55
- async receive (data) {
56
- if (!this.isConnected) {
57
- return;
58
- }
59
- // @ts-ignore messageHandler must be defined here
60
- await this.messageHandler.handleMessage(data);
61
- }
62
- }
63
-
64
- export default RpcClientRealDevice;