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/CHANGELOG.md +6 -0
- package/build/lib/rpc/remote-messages.js +3 -3
- package/build/lib/rpc/remote-messages.js.map +1 -1
- package/build/lib/rpc/rpc-client-real-device.d.ts +26 -8
- package/build/lib/rpc/rpc-client-real-device.d.ts.map +1 -1
- package/build/lib/rpc/rpc-client-real-device.js +21 -16
- package/build/lib/rpc/rpc-client-real-device.js.map +1 -1
- package/build/lib/rpc/rpc-client-simulator.d.ts +36 -28
- package/build/lib/rpc/rpc-client-simulator.d.ts.map +1 -1
- package/build/lib/rpc/rpc-client-simulator.js +39 -36
- package/build/lib/rpc/rpc-client-simulator.js.map +1 -1
- package/build/lib/rpc/rpc-client.d.ts +278 -189
- package/build/lib/rpc/rpc-client.d.ts.map +1 -1
- package/build/lib/rpc/rpc-client.js +222 -178
- package/build/lib/rpc/rpc-client.js.map +1 -1
- package/build/lib/types.d.ts +25 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/rpc/remote-messages.ts +3 -3
- package/lib/rpc/rpc-client-real-device.ts +68 -0
- package/lib/rpc/{rpc-client-simulator.js → rpc-client-simulator.ts} +54 -57
- package/lib/rpc/{rpc-client.js → rpc-client.ts} +368 -284
- package/lib/types.ts +27 -0
- package/package.json +1 -1
- package/lib/rpc/rpc-client-real-device.js +0 -64
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
|
@@ -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;
|