appium-remote-debugger 15.2.12 → 15.2.14
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/atoms.d.ts +16 -10
- package/build/lib/atoms.d.ts.map +1 -1
- package/build/lib/atoms.js +27 -16
- package/build/lib/atoms.js.map +1 -1
- package/build/lib/logger.d.ts +1 -2
- package/build/lib/logger.d.ts.map +1 -1
- package/build/lib/logger.js +2 -2
- package/build/lib/logger.js.map +1 -1
- 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/remote-debugger.js +2 -2
- package/build/lib/remote-debugger.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 +53 -38
- package/build/lib/rpc/remote-messages.js.map +1 -1
- package/build/lib/rpc/rpc-client-real-device.js +2 -5
- package/build/lib/rpc/rpc-client-real-device.js.map +1 -1
- package/build/lib/rpc/rpc-client-simulator.js +10 -10
- package/build/lib/rpc/rpc-client-simulator.js.map +1 -1
- package/build/lib/rpc/rpc-client.js +50 -50
- 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 +45 -59
- package/build/lib/rpc/rpc-message-handler.js.map +1 -1
- package/build/lib/types.d.ts +3 -0
- package/build/lib/types.d.ts.map +1 -1
- package/build/lib/utils.d.ts +54 -34
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +58 -39
- package/build/lib/utils.js.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/atoms.ts +98 -0
- package/lib/logger.ts +3 -0
- package/lib/protocol/{index.js → index.ts} +29 -17
- package/lib/remote-debugger.ts +1 -1
- package/lib/rpc/index.ts +2 -0
- package/lib/rpc/{remote-messages.js → remote-messages.ts} +70 -56
- package/lib/rpc/rpc-client-real-device.js +1 -1
- package/lib/rpc/rpc-client-simulator.js +1 -1
- package/lib/rpc/rpc-client.js +1 -1
- package/lib/rpc/{rpc-message-handler.js → rpc-message-handler.ts} +74 -65
- package/lib/types.ts +4 -0
- package/lib/{utils.js → utils.ts} +72 -51
- package/package.json +1 -1
- package/lib/atoms.js +0 -84
- package/lib/logger.js +0 -6
- package/lib/rpc/index.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [15.2.14](https://github.com/appium/appium-remote-debugger/compare/v15.2.13...v15.2.14) (2026-01-24)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* 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))
|
|
6
|
+
|
|
7
|
+
## [15.2.13](https://github.com/appium/appium-remote-debugger/compare/v15.2.12...v15.2.13) (2026-01-22)
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* Migrate various modules to typescript ([#468](https://github.com/appium/appium-remote-debugger/issues/468)) ([ff96233](https://github.com/appium/appium-remote-debugger/commit/ff96233dda3d76f4894d8a2e36dfaef99457933c))
|
|
12
|
+
|
|
1
13
|
## [15.2.12](https://github.com/appium/appium-remote-debugger/compare/v15.2.11...v15.2.12) (2026-01-21)
|
|
2
14
|
|
|
3
15
|
### Miscellaneous Chores
|
package/build/lib/atoms.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
export default getAtom;
|
|
2
1
|
/**
|
|
2
|
+
* Loads an atom script from the atoms directory and caches it.
|
|
3
|
+
* If the atom has been loaded before, returns the cached version.
|
|
3
4
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @returns
|
|
5
|
+
* @param atomName - The name of the atom to load (without the .js extension).
|
|
6
|
+
* @returns A promise that resolves to the atom script as a Buffer.
|
|
7
|
+
* @throws Error if the atom file cannot be loaded.
|
|
6
8
|
*/
|
|
7
|
-
export function getAtom(atomName: string): Promise<Buffer>;
|
|
9
|
+
export declare function getAtom(atomName: string): Promise<Buffer>;
|
|
8
10
|
/**
|
|
11
|
+
* Generates a complete script string for executing a Selenium atom.
|
|
12
|
+
* Handles frame contexts and optional async callbacks.
|
|
9
13
|
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
14
|
+
* @param atom - The name of the atom to execute.
|
|
15
|
+
* @param args - Arguments to pass to the atom function. Defaults to empty array.
|
|
16
|
+
* @param frames - Array of frame identifiers to execute the atom in nested frames.
|
|
17
|
+
* Defaults to empty array (executes in default context).
|
|
18
|
+
* @param asyncCallBack - Optional callback function string for async execution.
|
|
19
|
+
* If provided, the atom will be called with this callback.
|
|
20
|
+
* @returns A promise that resolves to the complete script string ready for execution.
|
|
15
21
|
*/
|
|
16
|
-
export function getScriptForAtom(atom: string, args?: any[], frames?: string[], asyncCallBack?: string | null): Promise<string>;
|
|
22
|
+
export declare function getScriptForAtom(atom: string, args?: any[], frames?: string[], asyncCallBack?: string | null): Promise<string>;
|
|
17
23
|
//# sourceMappingURL=atoms.d.ts.map
|
package/build/lib/atoms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../lib/atoms.
|
|
1
|
+
{"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../lib/atoms.ts"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY/D;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,GAAG,EAAO,EAChB,MAAM,GAAE,MAAM,EAAO,EACrB,aAAa,GAAE,MAAM,GAAG,IAAW,GAClC,OAAO,CAAC,MAAM,CAAC,CAsBjB"}
|
package/build/lib/atoms.js
CHANGED
|
@@ -8,12 +8,14 @@ exports.getScriptForAtom = getScriptForAtom;
|
|
|
8
8
|
const support_1 = require("@appium/support");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const lodash_1 = __importDefault(require("lodash"));
|
|
11
|
-
const logger_1 =
|
|
11
|
+
const logger_1 = require("./logger");
|
|
12
12
|
const utils_1 = require("./utils");
|
|
13
13
|
const ATOMS_CACHE = {};
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Converts a value to a JSON string, handling undefined values specially.
|
|
16
|
+
*
|
|
17
|
+
* @param obj - The value to stringify.
|
|
18
|
+
* @returns A JSON string representation of the value, or 'undefined' if the value is undefined.
|
|
17
19
|
*/
|
|
18
20
|
function atomsStringify(obj) {
|
|
19
21
|
if (typeof obj === 'undefined') {
|
|
@@ -22,9 +24,12 @@ function atomsStringify(obj) {
|
|
|
22
24
|
return JSON.stringify(obj);
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
27
|
+
* Loads an atom script from the atoms directory and caches it.
|
|
28
|
+
* If the atom has been loaded before, returns the cached version.
|
|
25
29
|
*
|
|
26
|
-
* @param
|
|
27
|
-
* @returns
|
|
30
|
+
* @param atomName - The name of the atom to load (without the .js extension).
|
|
31
|
+
* @returns A promise that resolves to the atom script as a Buffer.
|
|
32
|
+
* @throws Error if the atom file cannot be loaded.
|
|
28
33
|
*/
|
|
29
34
|
async function getAtom(atomName) {
|
|
30
35
|
// check if we have already loaded and cached this atom
|
|
@@ -40,23 +45,30 @@ async function getAtom(atomName) {
|
|
|
40
45
|
return ATOMS_CACHE[atomName];
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
48
|
+
* Wraps a script to execute it within a specific frame context.
|
|
49
|
+
* Uses the get_element_from_cache atom to access the frame element.
|
|
50
|
+
*
|
|
51
|
+
* @param script - The script to wrap.
|
|
52
|
+
* @param frame - The frame identifier to execute the script in.
|
|
53
|
+
* @returns A promise that resolves to the wrapped script string.
|
|
46
54
|
*/
|
|
47
55
|
async function wrapScriptForFrame(script, frame) {
|
|
48
|
-
logger_1.
|
|
56
|
+
logger_1.log.debug(`Wrapping script for frame '${frame}'`);
|
|
49
57
|
const elFromCache = await getAtom('get_element_from_cache');
|
|
50
58
|
return `(function (window) { var document = window.document; ` +
|
|
51
59
|
`return (${script}); })((${elFromCache.toString('utf8')})(${atomsStringify(frame)}))`;
|
|
52
60
|
}
|
|
53
61
|
/**
|
|
62
|
+
* Generates a complete script string for executing a Selenium atom.
|
|
63
|
+
* Handles frame contexts and optional async callbacks.
|
|
54
64
|
*
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
65
|
+
* @param atom - The name of the atom to execute.
|
|
66
|
+
* @param args - Arguments to pass to the atom function. Defaults to empty array.
|
|
67
|
+
* @param frames - Array of frame identifiers to execute the atom in nested frames.
|
|
68
|
+
* Defaults to empty array (executes in default context).
|
|
69
|
+
* @param asyncCallBack - Optional callback function string for async execution.
|
|
70
|
+
* If provided, the atom will be called with this callback.
|
|
71
|
+
* @returns A promise that resolves to the complete script string ready for execution.
|
|
60
72
|
*/
|
|
61
73
|
async function getScriptForAtom(atom, args = [], frames = [], asyncCallBack = null) {
|
|
62
74
|
const atomSrc = (await getAtom(atom)).toString('utf8');
|
|
@@ -68,7 +80,7 @@ async function getScriptForAtom(atom, args = [], frames = [], asyncCallBack = nu
|
|
|
68
80
|
}
|
|
69
81
|
}
|
|
70
82
|
else {
|
|
71
|
-
logger_1.
|
|
83
|
+
logger_1.log.debug(`Executing '${atom}' atom in default context`);
|
|
72
84
|
script = `(${atomSrc})`;
|
|
73
85
|
}
|
|
74
86
|
// add the arguments, as strings
|
|
@@ -81,5 +93,4 @@ async function getScriptForAtom(atom, args = [], frames = [], asyncCallBack = nu
|
|
|
81
93
|
}
|
|
82
94
|
return script;
|
|
83
95
|
}
|
|
84
|
-
exports.default = getAtom;
|
|
85
96
|
//# sourceMappingURL=atoms.js.map
|
package/build/lib/atoms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atoms.js","sourceRoot":"","sources":["../../lib/atoms.
|
|
1
|
+
{"version":3,"file":"atoms.js","sourceRoot":"","sources":["../../lib/atoms.ts"],"names":[],"mappings":";;;;;AA6BA,0BAYC;AA6BD,4CA2BC;AAjGD,6CAAqC;AACrC,gDAAwB;AACxB,oDAAuB;AACvB,qCAA+B;AAC/B,mCAAwC;AAExC,MAAM,WAAW,GAA2B,EAAE,CAAC;AAE/C;;;;;GAKG;AACH,SAAS,cAAc,CAAC,GAAQ;IAC9B,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE,CAAC;QAC/B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,OAAO,CAAC,QAAgB;IAC5C,uDAAuD;IACvD,IAAI,CAAC,gBAAC,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;QAClC,MAAM,YAAY,GAAG,cAAI,CAAC,OAAO,CAAC,IAAA,qBAAa,GAAE,EAAE,OAAO,EAAE,GAAG,QAA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;IAC1B,CAAC;IAED,gCAAgC;IAChC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,aAAa,SAAS,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/build/lib/logger.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,sCAAqC,CAAC"}
|
package/build/lib/logger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.log = void 0;
|
|
3
4
|
const support_1 = require("@appium/support");
|
|
4
|
-
|
|
5
|
-
exports.default = log;
|
|
5
|
+
exports.log = support_1.logger.getLogger('RemoteDebugger');
|
|
6
6
|
//# sourceMappingURL=logger.js.map
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAE5B,QAAA,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -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,EA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uB,EACvB,SAAkB,KAAK;IAEvB,MAAM,UAAU,GAAG,QAAQ,CAAC,MAA+B,CAAC,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"}
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.RemoteDebugger = exports.REMOTE_DEBUGGER_PORT = void 0;
|
|
40
40
|
const events_1 = require("events");
|
|
41
|
-
const logger_1 =
|
|
41
|
+
const logger_1 = require("./logger");
|
|
42
42
|
const rpc_1 = require("./rpc");
|
|
43
43
|
const utils_1 = require("./utils");
|
|
44
44
|
const connectMixins = __importStar(require("./mixins/connect"));
|
|
@@ -130,7 +130,7 @@ class RemoteDebugger extends events_1.EventEmitter {
|
|
|
130
130
|
frameDetached = navigationMixins.frameDetached;
|
|
131
131
|
constructor(opts = {}) {
|
|
132
132
|
super();
|
|
133
|
-
this._log = opts.log ?? logger_1.
|
|
133
|
+
this._log = opts.log ?? logger_1.log;
|
|
134
134
|
this.log.info(`Remote Debugger version ${MODULE_VERSION}`);
|
|
135
135
|
const { bundleId, additionalBundleIds = [], platformVersion, isSafari = true, includeSafari = false, pageLoadMs, host, port = exports.REMOTE_DEBUGGER_PORT, socketPath, pageReadyTimeout = PAGE_READY_TIMEOUT_MS, remoteDebugProxy, garbageCollectOnExecute = false, logFullResponse = false, logAllCommunication = false, logAllCommunicationHexDump = false, webInspectorMaxFrameLength, socketChunkSize, fullPageInitialization, pageLoadStrategy, } = opts;
|
|
136
136
|
this._bundleId = bundleId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-debugger.js","sourceRoot":"","sources":["../../lib/remote-debugger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"remote-debugger.js","sourceRoot":"","sources":["../../lib/remote-debugger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAsC;AACtC,qCAA6C;AAC7C,+BAA2C;AAC3C,mCAA8C;AAC9C,gEAAkD;AAClD,gEAAkD;AAClD,gFAAkE;AAClE,oEAAsD;AACtD,+DAAiD;AACjD,sEAAwD;AACxD,6DAA+C;AAC/C,mEAAqD;AACrD,oDAAuB;AAaV,QAAA,oBAAoB,GAAG,KAAK,CAAC;AAC1C,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAA,2BAAmB,GAAE,CAAC;AAG1D,MAAa,cAAe,SAAQ,qBAAY;IACpC,YAAY,CAAW;IACvB,qBAAqB,CAAgC;IACrD,QAAQ,CAAU;IAClB,SAAS,CAAY;IACrB,UAAU,CAAa;IACvB,iBAAiB,CAAkB;IACnC,aAAa,CAAU;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AAE,KAAc;QAC9C,IAAI,CAAC,6BAA6B,GAAG,KAAK,CAAC;IAC7C,CAAC;IAED,IAAI,4BAA4B;QAC9B,OAAO,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC;IAC9C,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,IAAI,gBAAgB,CAAC,iCAAiC,CAAC;IAChF,CAAC;IAED,IAAI,UAAU,CAAE,KAAa;QAC3B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;CACF;AA9OD,wCA8OC;AAED,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1D,cAAc,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;AAC/B,CAAC;AAED,kBAAe,cAAc,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;;;;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