appium-remote-debugger 15.2.13 → 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 +12 -0
- package/build/lib/protocol/index.d.ts +13 -8
- package/build/lib/protocol/index.d.ts.map +1 -1
- package/build/lib/protocol/index.js +17 -12
- package/build/lib/protocol/index.js.map +1 -1
- package/build/lib/rpc/index.d.ts +2 -3
- package/build/lib/rpc/index.d.ts.map +1 -1
- package/build/lib/rpc/index.js +2 -2
- package/build/lib/rpc/index.js.map +1 -1
- package/build/lib/rpc/remote-messages.d.ts +62 -41
- package/build/lib/rpc/remote-messages.d.ts.map +1 -1
- package/build/lib/rpc/remote-messages.js +56 -41
- 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/rpc/rpc-message-handler.d.ts +32 -39
- package/build/lib/rpc/rpc-message-handler.d.ts.map +1 -1
- package/build/lib/rpc/rpc-message-handler.js +39 -53
- package/build/lib/rpc/rpc-message-handler.js.map +1 -1
- package/build/lib/types.d.ts +28 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/test/functional/safari-e2e-specs.js +5 -1
- package/build/test/functional/safari-e2e-specs.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/protocol/{index.js → index.ts} +29 -17
- package/lib/rpc/index.ts +2 -0
- package/lib/rpc/{remote-messages.js → remote-messages.ts} +73 -59
- 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/rpc/{rpc-message-handler.js → rpc-message-handler.ts} +73 -64
- package/lib/types.ts +31 -0
- package/package.json +1 -1
- package/lib/rpc/index.js +0 -4
- package/lib/rpc/rpc-client-real-device.js +0 -64
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [15.3.0](https://github.com/appium/appium-remote-debugger/compare/v15.2.14...v15.3.0) (2026-01-24)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* Migrate RPC clients to typescript ([#472](https://github.com/appium/appium-remote-debugger/issues/472)) ([81f3aab](https://github.com/appium/appium-remote-debugger/commit/81f3aabb73257c87ae24261e00614e6d530662d0))
|
|
6
|
+
|
|
7
|
+
## [15.2.14](https://github.com/appium/appium-remote-debugger/compare/v15.2.13...v15.2.14) (2026-01-24)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* Migrate RPC helpers to typescript ([#471](https://github.com/appium/appium-remote-debugger/issues/471)) ([8da661f](https://github.com/appium/appium-remote-debugger/commit/8da661fe6554b5d7b862408fd24d1ce40873f30c))
|
|
12
|
+
|
|
1
13
|
## [15.2.13](https://github.com/appium/appium-remote-debugger/compare/v15.2.12...v15.2.13) (2026-01-22)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import type { RemoteCommandOpts, ProtocolCommandOpts } from '../types';
|
|
1
2
|
/**
|
|
3
|
+
* Generates a protocol command object based on the command name and options.
|
|
4
|
+
* Extracts only the parameters that are defined for the specific command in the
|
|
5
|
+
* WebKit Inspector protocol specification.
|
|
2
6
|
*
|
|
3
|
-
* @param
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* @param id - The command identifier.
|
|
8
|
+
* @param method - The protocol method name (e.g., 'Page.navigate', 'Runtime.evaluate').
|
|
9
|
+
* @param opts - Options containing parameters for the command.
|
|
10
|
+
* @param direct - If false (default), the resulting command params will be patched
|
|
11
|
+
* with default values (objectGroup, includeCommandLineAPI, etc.).
|
|
12
|
+
* If true, only the specified parameters are included.
|
|
13
|
+
* @returns A ProtocolCommandOpts object with id, method, and params.
|
|
14
|
+
* @throws Error if the command method is unknown.
|
|
9
15
|
*/
|
|
10
|
-
export function getProtocolCommand(id: string, method: string, opts:
|
|
11
|
-
export default getProtocolCommand;
|
|
16
|
+
export declare function getProtocolCommand(id: string, method: string, opts: RemoteCommandOpts, direct?: boolean): ProtocolCommandOpts;
|
|
12
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/protocol/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/protocol/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA0MvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,iBAAiB,EACvB,MAAM,GAAE,OAAe,GACtB,mBAAmB,CA4BrB"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProtocolCommand = getProtocolCommand;
|
|
4
4
|
const OBJECT_GROUP = 'console';
|
|
5
5
|
// See https://github.com/WebKit/webkit/tree/master/Source/JavaScriptCore/inspector/protocol
|
|
6
|
-
const COMMANDS =
|
|
6
|
+
const COMMANDS = {
|
|
7
7
|
// https://github.com/WebKit/WebKit/blob/main/Source/JavaScriptCore/inspector/protocol/Animation.json
|
|
8
8
|
//#region ANIMATION DOMAIN
|
|
9
9
|
'Animation.enable': [], // Enables Canvas domain events
|
|
@@ -171,24 +171,30 @@ const COMMANDS = /** @type {const} */ ({
|
|
|
171
171
|
'Worker.initialized': ['workerId'],
|
|
172
172
|
'Worker.sendMessageToWorker': ['workerId', 'message']
|
|
173
173
|
//#endregion
|
|
174
|
-
}
|
|
174
|
+
};
|
|
175
175
|
/**
|
|
176
|
+
* Generates a protocol command object based on the command name and options.
|
|
177
|
+
* Extracts only the parameters that are defined for the specific command in the
|
|
178
|
+
* WebKit Inspector protocol specification.
|
|
176
179
|
*
|
|
177
|
-
* @param
|
|
178
|
-
* @param
|
|
179
|
-
* @param
|
|
180
|
-
* @param
|
|
181
|
-
*
|
|
182
|
-
*
|
|
180
|
+
* @param id - The command identifier.
|
|
181
|
+
* @param method - The protocol method name (e.g., 'Page.navigate', 'Runtime.evaluate').
|
|
182
|
+
* @param opts - Options containing parameters for the command.
|
|
183
|
+
* @param direct - If false (default), the resulting command params will be patched
|
|
184
|
+
* with default values (objectGroup, includeCommandLineAPI, etc.).
|
|
185
|
+
* If true, only the specified parameters are included.
|
|
186
|
+
* @returns A ProtocolCommandOpts object with id, method, and params.
|
|
187
|
+
* @throws Error if the command method is unknown.
|
|
183
188
|
*/
|
|
184
189
|
function getProtocolCommand(id, method, opts, direct = false) {
|
|
185
190
|
const paramNames = COMMANDS[method];
|
|
186
191
|
if (!paramNames) {
|
|
187
192
|
throw new Error(`Unknown command: '${method}'`);
|
|
188
193
|
}
|
|
189
|
-
const params = paramNames
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
const params = paramNames
|
|
195
|
+
.reduce(function (acc, name) {
|
|
196
|
+
acc[name] = opts[name];
|
|
197
|
+
return acc;
|
|
192
198
|
}, {});
|
|
193
199
|
const result = {
|
|
194
200
|
id,
|
|
@@ -208,5 +214,4 @@ function getProtocolCommand(id, method, opts, direct = false) {
|
|
|
208
214
|
}
|
|
209
215
|
return result;
|
|
210
216
|
}
|
|
211
|
-
exports.default = getProtocolCommand;
|
|
212
217
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/protocol/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/protocol/index.ts"],"names":[],"mappings":";;AAyNA,gDAiCC;AAvPD,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B,4FAA4F;AAC5F,MAAM,QAAQ,GAAG;IACf,qGAAqG;IACrG,0BAA0B;IAC1B,kBAAkB,EAAE,EAAE,EAAE,+BAA+B;IACvD,mBAAmB,EAAE,EAAE,EAAE,gCAAgC;IACzD,YAAY;IAEZ,4GAA4G;IAC5G,iCAAiC;IACjC,yBAAyB,EAAE,EAAE;IAC7B,0BAA0B,EAAE,EAAE;IAC9B,yCAAyC,EAAE,EAAE;IAC7C,YAAY;IAEZ,iGAAiG;IACjG,sBAAsB;IACtB,YAAY;IAEZ,mGAAmG;IACnG,wBAAwB;IACxB,gBAAgB,EAAE,EAAE,EAAE,wDAAwD;IAC9E,iBAAiB,EAAE,EAAE,EAAE,iCAAiC;IACxD,YAAY;IAEZ,kGAAkG;IAClG,uBAAuB;IACvB,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,YAAY;IAEZ,uGAAuG;IACvG,4BAA4B;IAC5B,2BAA2B,EAAE,EAAE;IAC/B,0BAA0B,EAAE,EAAE;IAC9B,YAAY;IAEZ,mGAAmG;IACnG,wBAAwB;IACxB,iBAAiB,EAAE,EAAE;IACrB,gBAAgB,EAAE,EAAE;IACpB,uBAAuB,EAAE,EAAE;IAC3B,4BAA4B,EAAE,EAAE;IAChC,gCAAgC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IACrD,YA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AAC,CAAC;IAC7D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,qBAAqB,MAAM,GAAG,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,MAAM,GAAkB,UAAgC;SAC3D,MAAM,CAAC,UAAU,GAAiB,EAAE,IAAY;QAC/C,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAkB,CAAC,CAAC;IACzB,MAAM,MAAM,GAAwB;QAClC,EAAE;QACF,MAAM;QACN,MAAM;KACP,CAAC;IACF,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,MAAM,GAAG;YACd,WAAW,EAAE,YAAY;YACzB,qBAAqB,EAAE,IAAI;YAC3B,oCAAoC,EAAE,KAAK;YAC3C,kBAAkB,EAAE,KAAK;YACzB,eAAe,EAAE,KAAK;YACtB,UAAU,EAAE,KAAK;YACjB,GAAG,MAAM,CAAC,MAAM;SACjB,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/build/lib/rpc/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { RpcClientSimulator, RpcClientRealDevice };
|
|
1
|
+
export { RpcClientSimulator } from './rpc-client-simulator';
|
|
2
|
+
export { RpcClientRealDevice } from './rpc-client-real-device';
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/rpc/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/rpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/build/lib/rpc/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RpcClientRealDevice = exports.RpcClientSimulator = void 0;
|
|
4
|
-
|
|
4
|
+
var rpc_client_simulator_1 = require("./rpc-client-simulator");
|
|
5
5
|
Object.defineProperty(exports, "RpcClientSimulator", { enumerable: true, get: function () { return rpc_client_simulator_1.RpcClientSimulator; } });
|
|
6
|
-
|
|
6
|
+
var rpc_client_real_device_1 = require("./rpc-client-real-device");
|
|
7
7
|
Object.defineProperty(exports, "RpcClientRealDevice", { enumerable: true, get: function () { return rpc_client_real_device_1.RpcClientRealDevice; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/rpc/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/rpc/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAC3B,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA"}
|
|
@@ -1,72 +1,93 @@
|
|
|
1
|
+
import type { RawRemoteCommand, RemoteCommandOpts, ProtocolCommandOpts, AppIdKey, PageIdKey, RemoteCommandId } from '../types';
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Generates remote commands for communicating with the Web Inspector.
|
|
4
|
+
* Provides methods for creating various types of commands including connection
|
|
5
|
+
* setup, application management, and protocol commands.
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
-
export class RemoteMessages {
|
|
7
|
+
export declare class RemoteMessages {
|
|
8
8
|
/**
|
|
9
|
+
* Creates a command to set the connection key for the Web Inspector session.
|
|
9
10
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @returns
|
|
11
|
+
* @param connId - The connection identifier.
|
|
12
|
+
* @returns A RawRemoteCommand for setting the connection key.
|
|
12
13
|
*/
|
|
13
|
-
setConnectionKey(connId: string):
|
|
14
|
+
setConnectionKey(connId: string): RawRemoteCommand;
|
|
14
15
|
/**
|
|
16
|
+
* Creates a command to connect to a specific application.
|
|
15
17
|
*
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @returns
|
|
18
|
+
* @param connId - The connection identifier.
|
|
19
|
+
* @param appIdKey - The application identifier key.
|
|
20
|
+
* @returns A RawRemoteCommand for connecting to the application.
|
|
19
21
|
*/
|
|
20
|
-
connectToApp(connId: string, appIdKey:
|
|
22
|
+
connectToApp(connId: string, appIdKey: AppIdKey): RawRemoteCommand;
|
|
21
23
|
/**
|
|
24
|
+
* Creates a command to set the sender key for message routing.
|
|
22
25
|
*
|
|
23
|
-
* @param
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
27
|
-
* @returns
|
|
26
|
+
* @param connId - The connection identifier.
|
|
27
|
+
* @param senderId - The sender identifier.
|
|
28
|
+
* @param appIdKey - The application identifier key.
|
|
29
|
+
* @param pageIdKey - Optional page identifier key.
|
|
30
|
+
* @returns A RawRemoteCommand for setting the sender key.
|
|
28
31
|
*/
|
|
29
|
-
setSenderKey(connId: string, senderId: string, appIdKey:
|
|
32
|
+
setSenderKey(connId: string, senderId: string, appIdKey: AppIdKey, pageIdKey?: PageIdKey): RawRemoteCommand;
|
|
30
33
|
/**
|
|
34
|
+
* Creates a command to indicate web view status.
|
|
31
35
|
*
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @returns
|
|
36
|
+
* @param connId - The connection identifier.
|
|
37
|
+
* @param appIdKey - The application identifier key.
|
|
38
|
+
* @param pageIdKey - Optional page identifier key.
|
|
39
|
+
* @param enabled - Whether the web view indication is enabled. Defaults to true if not provided.
|
|
40
|
+
* @returns A RawRemoteCommand for indicating web view status.
|
|
37
41
|
*/
|
|
38
|
-
indicateWebView(connId: string, appIdKey:
|
|
42
|
+
indicateWebView(connId: string, appIdKey: AppIdKey, pageIdKey?: PageIdKey, enabled?: boolean): RawRemoteCommand;
|
|
39
43
|
/**
|
|
44
|
+
* Creates a command to launch an application.
|
|
40
45
|
*
|
|
41
|
-
* @param
|
|
42
|
-
* @returns
|
|
46
|
+
* @param bundleId - The bundle identifier of the application to launch.
|
|
47
|
+
* @returns A RawRemoteCommand for launching the application.
|
|
43
48
|
*/
|
|
44
|
-
launchApplication(bundleId: string):
|
|
49
|
+
launchApplication(bundleId: string): RawRemoteCommand;
|
|
45
50
|
/**
|
|
51
|
+
* Creates a full command with all default parameters included.
|
|
52
|
+
* This includes objectGroup, includeCommandLineAPI, and other runtime options.
|
|
46
53
|
*
|
|
47
|
-
* @param
|
|
48
|
-
* @returns
|
|
54
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
55
|
+
* @returns A RawRemoteCommand with full parameter set.
|
|
49
56
|
*/
|
|
50
|
-
getFullCommand(opts:
|
|
57
|
+
getFullCommand(opts: RemoteCommandOpts & ProtocolCommandOpts): RawRemoteCommand;
|
|
51
58
|
/**
|
|
59
|
+
* Creates a minimal command with only the essential parameters.
|
|
60
|
+
* This is the default command type for most operations.
|
|
52
61
|
*
|
|
53
|
-
* @param
|
|
54
|
-
* @returns
|
|
62
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
63
|
+
* @returns A RawRemoteCommand with minimal parameter set.
|
|
55
64
|
*/
|
|
56
|
-
getMinimalCommand(opts:
|
|
65
|
+
getMinimalCommand(opts: RemoteCommandOpts & ProtocolCommandOpts): RawRemoteCommand;
|
|
57
66
|
/**
|
|
67
|
+
* Creates a direct command that bypasses the Target.sendMessageToTarget wrapper.
|
|
68
|
+
* Used for certain Target domain commands.
|
|
58
69
|
*
|
|
59
|
-
* @param
|
|
60
|
-
* @returns
|
|
70
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
71
|
+
* @returns A RawRemoteCommand for direct protocol communication.
|
|
61
72
|
*/
|
|
62
|
-
getDirectCommand(opts:
|
|
73
|
+
getDirectCommand(opts: RemoteCommandOpts & ProtocolCommandOpts): RawRemoteCommand;
|
|
63
74
|
/**
|
|
75
|
+
* Gets a remote command based on the command name and options.
|
|
76
|
+
* Handles both Safari Web Inspector commands and WebKit protocol commands.
|
|
64
77
|
*
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
67
|
-
* @returns
|
|
78
|
+
* @param command - The command name (e.g., 'setConnectionKey', 'Page.navigate').
|
|
79
|
+
* @param opts - Options for the command.
|
|
80
|
+
* @returns A RawRemoteCommand appropriate for the given command.
|
|
81
|
+
* @throws Error if required parameters are missing for specific commands.
|
|
68
82
|
*/
|
|
69
|
-
getRemoteCommand(command: string, opts:
|
|
83
|
+
getRemoteCommand(command: string, opts: RemoteCommandOpts & RemoteCommandId): RawRemoteCommand;
|
|
70
84
|
}
|
|
71
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Checks if a command should use the direct command format.
|
|
87
|
+
* Direct commands bypass the Target.sendMessageToTarget wrapper.
|
|
88
|
+
*
|
|
89
|
+
* @param command - The command name to check.
|
|
90
|
+
* @returns True if the command should use direct format, false otherwise.
|
|
91
|
+
*/
|
|
92
|
+
export declare function isDirectCommand(command: string): boolean;
|
|
72
93
|
//# sourceMappingURL=remote-messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-messages.d.ts","sourceRoot":"","sources":["../../../lib/rpc/remote-messages.
|
|
1
|
+
{"version":3,"file":"remote-messages.d.ts","sourceRoot":"","sources":["../../../lib/rpc/remote-messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA4B/H;;;;GAIG;AACH,qBAAa,cAAc;IACzB;;;;;OAKG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB;IASlD;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,gBAAgB;IAUlE;;;;;;;;OAQG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,gBAAgB;IAa3G;;;;;;;;OAQG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,gBAAgB;IAY/G;;;;;OAKG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB;IASrD;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB;IAqD/E;;;;;;OAMG;IACH,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB;IA6BlF;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB;IAoBjF;;;;;;;;OAQG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,GAAG,eAAe,GAAG,gBAAgB;CAwD/F;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
@@ -13,7 +13,7 @@ const FULL_COMMAND = 'getFullCommand';
|
|
|
13
13
|
const DIRECT_COMMAND = 'getDirectCommand';
|
|
14
14
|
// mapping of commands to the function for getting the command
|
|
15
15
|
// defaults to `getMinimalCommand`, so no need to have those listed here
|
|
16
|
-
const COMMANDS =
|
|
16
|
+
const COMMANDS = {
|
|
17
17
|
'Page.getCookies': FULL_COMMAND,
|
|
18
18
|
'Page.navigate': FULL_COMMAND,
|
|
19
19
|
'Runtime.awaitPromise': FULL_COMMAND,
|
|
@@ -24,13 +24,18 @@ const COMMANDS = /** @type {const} */ ({
|
|
|
24
24
|
'Target.resume': DIRECT_COMMAND,
|
|
25
25
|
'Timeline.start': FULL_COMMAND,
|
|
26
26
|
'Timeline.stop': FULL_COMMAND,
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Generates remote commands for communicating with the Web Inspector.
|
|
30
|
+
* Provides methods for creating various types of commands including connection
|
|
31
|
+
* setup, application management, and protocol commands.
|
|
32
|
+
*/
|
|
28
33
|
class RemoteMessages {
|
|
29
|
-
// #region Connection functions
|
|
30
34
|
/**
|
|
35
|
+
* Creates a command to set the connection key for the Web Inspector session.
|
|
31
36
|
*
|
|
32
|
-
* @param
|
|
33
|
-
* @returns
|
|
37
|
+
* @param connId - The connection identifier.
|
|
38
|
+
* @returns A RawRemoteCommand for setting the connection key.
|
|
34
39
|
*/
|
|
35
40
|
setConnectionKey(connId) {
|
|
36
41
|
return {
|
|
@@ -41,10 +46,11 @@ class RemoteMessages {
|
|
|
41
46
|
};
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
49
|
+
* Creates a command to connect to a specific application.
|
|
44
50
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
47
|
-
* @returns
|
|
51
|
+
* @param connId - The connection identifier.
|
|
52
|
+
* @param appIdKey - The application identifier key.
|
|
53
|
+
* @returns A RawRemoteCommand for connecting to the application.
|
|
48
54
|
*/
|
|
49
55
|
connectToApp(connId, appIdKey) {
|
|
50
56
|
return {
|
|
@@ -56,12 +62,13 @@ class RemoteMessages {
|
|
|
56
62
|
};
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
65
|
+
* Creates a command to set the sender key for message routing.
|
|
59
66
|
*
|
|
60
|
-
* @param
|
|
61
|
-
* @param
|
|
62
|
-
* @param
|
|
63
|
-
* @param
|
|
64
|
-
* @returns
|
|
67
|
+
* @param connId - The connection identifier.
|
|
68
|
+
* @param senderId - The sender identifier.
|
|
69
|
+
* @param appIdKey - The application identifier key.
|
|
70
|
+
* @param pageIdKey - Optional page identifier key.
|
|
71
|
+
* @returns A RawRemoteCommand for setting the sender key.
|
|
65
72
|
*/
|
|
66
73
|
setSenderKey(connId, senderId, appIdKey, pageIdKey) {
|
|
67
74
|
return {
|
|
@@ -76,12 +83,13 @@ class RemoteMessages {
|
|
|
76
83
|
};
|
|
77
84
|
}
|
|
78
85
|
/**
|
|
86
|
+
* Creates a command to indicate web view status.
|
|
79
87
|
*
|
|
80
|
-
* @param
|
|
81
|
-
* @param
|
|
82
|
-
* @param
|
|
83
|
-
* @param
|
|
84
|
-
* @returns
|
|
88
|
+
* @param connId - The connection identifier.
|
|
89
|
+
* @param appIdKey - The application identifier key.
|
|
90
|
+
* @param pageIdKey - Optional page identifier key.
|
|
91
|
+
* @param enabled - Whether the web view indication is enabled. Defaults to true if not provided.
|
|
92
|
+
* @returns A RawRemoteCommand for indicating web view status.
|
|
85
93
|
*/
|
|
86
94
|
indicateWebView(connId, appIdKey, pageIdKey, enabled) {
|
|
87
95
|
return {
|
|
@@ -95,9 +103,10 @@ class RemoteMessages {
|
|
|
95
103
|
};
|
|
96
104
|
}
|
|
97
105
|
/**
|
|
106
|
+
* Creates a command to launch an application.
|
|
98
107
|
*
|
|
99
|
-
* @param
|
|
100
|
-
* @returns
|
|
108
|
+
* @param bundleId - The bundle identifier of the application to launch.
|
|
109
|
+
* @returns A RawRemoteCommand for launching the application.
|
|
101
110
|
*/
|
|
102
111
|
launchApplication(bundleId) {
|
|
103
112
|
return {
|
|
@@ -108,9 +117,11 @@ class RemoteMessages {
|
|
|
108
117
|
};
|
|
109
118
|
}
|
|
110
119
|
/**
|
|
120
|
+
* Creates a full command with all default parameters included.
|
|
121
|
+
* This includes objectGroup, includeCommandLineAPI, and other runtime options.
|
|
111
122
|
*
|
|
112
|
-
* @param
|
|
113
|
-
* @returns
|
|
123
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
124
|
+
* @returns A RawRemoteCommand with full parameter set.
|
|
114
125
|
*/
|
|
115
126
|
getFullCommand(opts) {
|
|
116
127
|
const { method, params, connId, senderId, appIdKey, pageIdKey, targetId, id, } = opts;
|
|
@@ -125,7 +136,7 @@ class RemoteMessages {
|
|
|
125
136
|
const realParams = {
|
|
126
137
|
targetId,
|
|
127
138
|
message: JSON.stringify({
|
|
128
|
-
id,
|
|
139
|
+
id: parseInt(id, 10),
|
|
129
140
|
method,
|
|
130
141
|
params: Object.assign({
|
|
131
142
|
objectGroup: OBJECT_GROUP,
|
|
@@ -150,13 +161,14 @@ class RemoteMessages {
|
|
|
150
161
|
},
|
|
151
162
|
__selector: '_rpc_forwardSocketData:',
|
|
152
163
|
};
|
|
153
|
-
// @ts-ignore This is ok
|
|
154
164
|
return lodash_1.default.omitBy(plist, lodash_1.default.isNil);
|
|
155
165
|
}
|
|
156
166
|
/**
|
|
167
|
+
* Creates a minimal command with only the essential parameters.
|
|
168
|
+
* This is the default command type for most operations.
|
|
157
169
|
*
|
|
158
|
-
* @param
|
|
159
|
-
* @returns
|
|
170
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
171
|
+
* @returns A RawRemoteCommand with minimal parameter set.
|
|
160
172
|
*/
|
|
161
173
|
getMinimalCommand(opts) {
|
|
162
174
|
const { method, params, connId, senderId, appIdKey, pageIdKey, targetId, id } = opts;
|
|
@@ -164,7 +176,7 @@ class RemoteMessages {
|
|
|
164
176
|
const realParams = {
|
|
165
177
|
targetId,
|
|
166
178
|
message: JSON.stringify({
|
|
167
|
-
id,
|
|
179
|
+
id: parseInt(id, 10),
|
|
168
180
|
method,
|
|
169
181
|
params,
|
|
170
182
|
}),
|
|
@@ -182,20 +194,21 @@ class RemoteMessages {
|
|
|
182
194
|
},
|
|
183
195
|
__selector: '_rpc_forwardSocketData:'
|
|
184
196
|
};
|
|
185
|
-
// @ts-ignore This is ok
|
|
186
197
|
return lodash_1.default.omitBy(plist, lodash_1.default.isNil);
|
|
187
198
|
}
|
|
188
199
|
/**
|
|
200
|
+
* Creates a direct command that bypasses the Target.sendMessageToTarget wrapper.
|
|
201
|
+
* Used for certain Target domain commands.
|
|
189
202
|
*
|
|
190
|
-
* @param
|
|
191
|
-
* @returns
|
|
203
|
+
* @param opts - Options combining RemoteCommandOpts and ProtocolCommandOpts.
|
|
204
|
+
* @returns A RawRemoteCommand for direct protocol communication.
|
|
192
205
|
*/
|
|
193
206
|
getDirectCommand(opts) {
|
|
194
207
|
const { method, params, connId, senderId, appIdKey, pageIdKey, id } = opts;
|
|
195
208
|
const plist = {
|
|
196
209
|
__argument: {
|
|
197
210
|
WIRSocketDataKey: {
|
|
198
|
-
id,
|
|
211
|
+
id: parseInt(id, 10),
|
|
199
212
|
method,
|
|
200
213
|
params,
|
|
201
214
|
},
|
|
@@ -206,14 +219,16 @@ class RemoteMessages {
|
|
|
206
219
|
},
|
|
207
220
|
__selector: '_rpc_forwardSocketData:'
|
|
208
221
|
};
|
|
209
|
-
// @ts-ignore This is ok
|
|
210
222
|
return lodash_1.default.omitBy(plist, lodash_1.default.isNil);
|
|
211
223
|
}
|
|
212
224
|
/**
|
|
225
|
+
* Gets a remote command based on the command name and options.
|
|
226
|
+
* Handles both Safari Web Inspector commands and WebKit protocol commands.
|
|
213
227
|
*
|
|
214
|
-
* @param
|
|
215
|
-
* @param
|
|
216
|
-
* @returns
|
|
228
|
+
* @param command - The command name (e.g., 'setConnectionKey', 'Page.navigate').
|
|
229
|
+
* @param opts - Options for the command.
|
|
230
|
+
* @returns A RawRemoteCommand appropriate for the given command.
|
|
231
|
+
* @throws Error if required parameters are missing for specific commands.
|
|
217
232
|
*/
|
|
218
233
|
getRemoteCommand(command, opts) {
|
|
219
234
|
const { id, connId, appIdKey, senderId, pageIdKey, targetId, } = opts;
|
|
@@ -246,9 +261,8 @@ class RemoteMessages {
|
|
|
246
261
|
return this.launchApplication(opts.bundleId);
|
|
247
262
|
}
|
|
248
263
|
// deal with WebKit commands
|
|
249
|
-
const builderFunction = COMMANDS[command] || MINIMAL_COMMAND;
|
|
250
|
-
const commonOpts = (0, protocol_1.getProtocolCommand)(
|
|
251
|
-
/** @type {string} */ (id), command, opts, isDirectCommand(command));
|
|
264
|
+
const builderFunction = (COMMANDS[command] || MINIMAL_COMMAND);
|
|
265
|
+
const commonOpts = (0, protocol_1.getProtocolCommand)(id, command, opts, isDirectCommand(command));
|
|
252
266
|
return this[builderFunction]({
|
|
253
267
|
...commonOpts,
|
|
254
268
|
connId,
|
|
@@ -261,12 +275,13 @@ class RemoteMessages {
|
|
|
261
275
|
}
|
|
262
276
|
exports.RemoteMessages = RemoteMessages;
|
|
263
277
|
/**
|
|
278
|
+
* Checks if a command should use the direct command format.
|
|
279
|
+
* Direct commands bypass the Target.sendMessageToTarget wrapper.
|
|
264
280
|
*
|
|
265
|
-
* @param
|
|
266
|
-
* @returns
|
|
281
|
+
* @param command - The command name to check.
|
|
282
|
+
* @returns True if the command should use direct format, false otherwise.
|
|
267
283
|
*/
|
|
268
284
|
function isDirectCommand(command) {
|
|
269
285
|
return COMMANDS[command] === DIRECT_COMMAND;
|
|
270
286
|
}
|
|
271
|
-
exports.default = RemoteMessages;
|
|
272
287
|
//# sourceMappingURL=remote-messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-messages.js","sourceRoot":"","sources":["../../../lib/rpc/remote-messages.
|
|
1
|
+
{"version":3,"file":"remote-messages.js","sourceRoot":"","sources":["../../../lib/rpc/remote-messages.ts"],"names":[],"mappings":";;;;;;AAmUA,0CAEC;AArUD,oDAAuB;AACvB,0CAAiD;AAGjD,MAAM,YAAY,GAAG,SAAS,CAAC;AAE/B,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAC5C,MAAM,YAAY,GAAG,gBAAgB,CAAC;AACtC,MAAM,cAAc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,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;YAClE,KAAK,mBAAmB;gBACtB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACnB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;gBACnE,CAAC;gBACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,CAAC;QAED,4BAA4B;QAC5B,MAAM,eAAe,GAAG,CAAC,QAAQ,CAAC,OAAgC,CAAC,IAAI,eAAe,CAA2B,CAAC;QAClH,MAAM,UAAU,GAAG,IAAA,6BAAkB,EACnC,EAAE,EACF,OAAO,EACP,IAAI,EACJ,eAAe,CAAC,OAAO,CAAC,CACzB,CAAC;QACF,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;YAC3B,GAAG,UAAU;YACb,MAAM;YACN,QAAQ;YACR,QAAQ;YACR,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CACF;AAvRD,wCAuRC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,OAAe;IAC7C,OAAO,QAAQ,CAAC,OAAgC,CAAC,KAAK,cAAc,CAAC;AACvE,CAAC"}
|
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { RpcClient } from './rpc-client';
|
|
2
|
+
import type { RemoteCommand } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* RPC client implementation for real iOS devices.
|
|
5
|
+
* Extends RpcClient to provide device-specific connection handling.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RpcClientRealDevice extends RpcClient {
|
|
8
|
+
protected service?: any;
|
|
9
|
+
/**
|
|
10
|
+
* Connects to the Web Inspector service on a real iOS device.
|
|
11
|
+
* Starts the Web Inspector service and sets up message listening.
|
|
12
|
+
*/
|
|
13
|
+
connect(): Promise<void>;
|
|
3
14
|
/**
|
|
4
|
-
*
|
|
15
|
+
* Disconnects from the Web Inspector service on the real device.
|
|
16
|
+
* Closes the service connection and cleans up resources.
|
|
5
17
|
*/
|
|
6
|
-
|
|
18
|
+
disconnect(): Promise<void>;
|
|
7
19
|
/**
|
|
8
|
-
*
|
|
20
|
+
* Sends a command message to the Web Inspector service.
|
|
21
|
+
*
|
|
22
|
+
* @param cmd - The command to send to the device.
|
|
9
23
|
*/
|
|
10
|
-
|
|
24
|
+
sendMessage(cmd: RemoteCommand): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Receives data from the Web Inspector service and handles it.
|
|
27
|
+
*
|
|
28
|
+
* @param data - The data received from the service.
|
|
29
|
+
*/
|
|
30
|
+
receive(data: any): Promise<void>;
|
|
11
31
|
}
|
|
12
|
-
export default RpcClientRealDevice;
|
|
13
|
-
import { RpcClient } from './rpc-client';
|
|
14
32
|
//# sourceMappingURL=rpc-client-real-device.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-client-real-device.d.ts","sourceRoot":"","sources":["../../../lib/rpc/rpc-client-real-device.
|
|
1
|
+
{"version":3,"file":"rpc-client-real-device.d.ts","sourceRoot":"","sources":["../../../lib/rpc/rpc-client-real-device.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,SAAS,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAExB;;;OAGG;IACY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAcvC;;;OAGG;IACY,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAW1C;;;;OAIG;IACY,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAO7D;;;;OAIG;IACY,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAKjD"}
|