@appium/base-driver 9.16.4 → 9.18.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/build/lib/basedriver/capabilities.d.ts +1 -1
- package/build/lib/basedriver/capabilities.d.ts.map +1 -1
- package/build/lib/basedriver/capabilities.js +1 -1
- package/build/lib/basedriver/capabilities.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +2 -2
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +2 -1
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +2 -2
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/driver.d.ts +5 -1
- package/build/lib/basedriver/driver.d.ts.map +1 -1
- package/build/lib/basedriver/driver.js +6 -1
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/extension-core.js +1 -1
- package/build/lib/basedriver/extension-core.js.map +1 -1
- package/build/lib/basedriver/helpers.js +3 -3
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/express/middleware.d.ts.map +1 -1
- package/build/lib/express/middleware.js +23 -3
- package/build/lib/express/middleware.js.map +1 -1
- package/build/lib/express/server.js +2 -2
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/jsonwp-proxy/protocol-converter.js +2 -2
- package/build/lib/jsonwp-proxy/protocol-converter.js.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.js +1 -1
- package/build/lib/jsonwp-proxy/proxy.js.map +1 -1
- package/build/lib/protocol/index.d.ts +2 -1
- package/build/lib/protocol/index.d.ts.map +1 -1
- package/build/lib/protocol/index.js +2 -1
- package/build/lib/protocol/index.js.map +1 -1
- package/build/lib/protocol/protocol.js +3 -3
- package/build/lib/protocol/protocol.js.map +1 -1
- package/build/lib/protocol/routes.d.ts +10 -0
- package/build/lib/protocol/routes.d.ts.map +1 -1
- package/build/lib/protocol/routes.js +22 -9
- package/build/lib/protocol/routes.js.map +1 -1
- package/build/lib/protocol/validators.d.ts.map +1 -1
- package/build/lib/protocol/validators.js +3 -0
- package/build/lib/protocol/validators.js.map +1 -1
- package/lib/basedriver/capabilities.ts +2 -2
- package/lib/basedriver/commands/timeout.ts +2 -2
- package/lib/basedriver/core.ts +4 -2
- package/lib/basedriver/driver.ts +7 -1
- package/lib/basedriver/extension-core.ts +1 -1
- package/lib/basedriver/helpers.js +3 -3
- package/lib/express/middleware.js +24 -3
- package/lib/express/server.js +2 -2
- package/lib/jsonwp-proxy/protocol-converter.js +2 -2
- package/lib/jsonwp-proxy/proxy.js +1 -1
- package/lib/protocol/index.js +8 -1
- package/lib/protocol/protocol.js +3 -3
- package/lib/protocol/routes.js +22 -9
- package/lib/protocol/validators.js +3 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../lib/protocol/validators.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAEvB,SAAS,QAAQ,CAAC,CAAC;IACjB,OAAO,gBAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,WAAW,CAAC,EAAE;IACrB,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;QACd,6DAA6D;QAC7D,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,2CAA2C,CAAC,EAAE,CAAC;YACpE,MAA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{
|
|
|
27
27
|
};
|
|
28
28
|
export type ValidateCapsOpts = {
|
|
29
29
|
/** if true, skip the presence constraint */
|
|
30
|
-
skipPresenceConstraint?: boolean
|
|
30
|
+
skipPresenceConstraint?: boolean;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -377,7 +377,7 @@ export function promoteAppiumOptionsForObject<C extends Constraints>(obj: NSCapa
|
|
|
377
377
|
}
|
|
378
378
|
if (isStandardCap(capName)) {
|
|
379
379
|
throw new errors.SessionNotCreatedError(
|
|
380
|
-
`${PREFIXED_APPIUM_OPTS_CAP} must only contain vendor-specific
|
|
380
|
+
`${PREFIXED_APPIUM_OPTS_CAP} must only contain vendor-specific capabilities. '${capName}' is unexpected`
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
383
|
return capName;
|
|
@@ -106,7 +106,7 @@ const TimeoutCommands: ITimeoutCommands = {
|
|
|
106
106
|
|
|
107
107
|
this.implicitWaitMs = ms;
|
|
108
108
|
this.log.debug(`Set implicit wait to ${ms}ms`);
|
|
109
|
-
if (this.managedDrivers
|
|
109
|
+
if (this.managedDrivers?.length) {
|
|
110
110
|
this.log.debug('Setting implicit wait on managed drivers');
|
|
111
111
|
for (const driver of this.managedDrivers) {
|
|
112
112
|
if (_.isFunction(driver.setImplicitWait)) {
|
|
@@ -119,7 +119,7 @@ const TimeoutCommands: ITimeoutCommands = {
|
|
|
119
119
|
setNewCommandTimeout<C extends Constraints>(this: BaseDriver<C>, ms: number) {
|
|
120
120
|
this.newCommandTimeoutMs = ms;
|
|
121
121
|
this.log.debug(`Set new command timeout to ${ms}ms`);
|
|
122
|
-
if (this.managedDrivers
|
|
122
|
+
if (this.managedDrivers?.length) {
|
|
123
123
|
this.log.debug('Setting new command timeout on managed drivers');
|
|
124
124
|
for (const driver of this.managedDrivers) {
|
|
125
125
|
if (_.isFunction(driver.setNewCommandTimeout)) {
|
package/lib/basedriver/core.ts
CHANGED
|
@@ -41,6 +41,8 @@ export class DriverCore<const C extends Constraints, Settings extends StringReco
|
|
|
41
41
|
|
|
42
42
|
sessionId: string | null;
|
|
43
43
|
|
|
44
|
+
sessionCreationTimestampMs: number;
|
|
45
|
+
|
|
44
46
|
opts: DriverOpts<C>;
|
|
45
47
|
|
|
46
48
|
initialOpts: InitialOpts;
|
|
@@ -137,7 +139,7 @@ export class DriverCore<const C extends Constraints, Settings extends StringReco
|
|
|
137
139
|
/**
|
|
138
140
|
* Set a callback handler if needed to execute a custom piece of code
|
|
139
141
|
* when the driver is shut down unexpectedly. Multiple calls to this method
|
|
140
|
-
* will cause the handler to be executed
|
|
142
|
+
* will cause the handler to be executed multiple times
|
|
141
143
|
*
|
|
142
144
|
* @param handler The code to be executed on unexpected shutdown.
|
|
143
145
|
* The function may accept one argument, which is the actual error instance, which
|
|
@@ -314,7 +316,7 @@ export class DriverCore<const C extends Constraints, Settings extends StringReco
|
|
|
314
316
|
`Potentially insecure feature '${name}' has not been ` +
|
|
315
317
|
`enabled. If you want to enable this feature and accept ` +
|
|
316
318
|
`the security ramifications, please do so by following ` +
|
|
317
|
-
`the documented instructions at http://appium.io/docs/en/
|
|
319
|
+
`the documented instructions at http://appium.io/docs/en/latest/guides/security/`,
|
|
318
320
|
);
|
|
319
321
|
}
|
|
320
322
|
}
|
package/lib/basedriver/driver.ts
CHANGED
|
@@ -302,6 +302,7 @@ export class BaseDriver<
|
|
|
302
302
|
this.validateDesiredCaps(caps);
|
|
303
303
|
|
|
304
304
|
this.sessionId = util.uuidV4();
|
|
305
|
+
this.sessionCreationTimestampMs = Date.now();
|
|
305
306
|
this.caps = caps;
|
|
306
307
|
// merge caps onto opts so we don't need to worry about what's where
|
|
307
308
|
this.opts = {..._.cloneDeep(this.initialOpts), ...this.caps};
|
|
@@ -345,6 +346,11 @@ export class BaseDriver<
|
|
|
345
346
|
|
|
346
347
|
return [this.sessionId, caps] as CreateResult;
|
|
347
348
|
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Returns the session id and capabilities for the session
|
|
352
|
+
* @deprecated Use AppiumDriver.getAppiumSessions instead for getting the session data.
|
|
353
|
+
*/
|
|
348
354
|
async getSessions() {
|
|
349
355
|
const ret: MultiSessionData<C>[] = [];
|
|
350
356
|
|
|
@@ -360,7 +366,7 @@ export class BaseDriver<
|
|
|
360
366
|
|
|
361
367
|
/**
|
|
362
368
|
* Returns capabilities for the session and event history (if applicable)
|
|
363
|
-
* @deprecated Use {@linkcode
|
|
369
|
+
* @deprecated Use {@linkcode getAppiumSessionCapabilities} instead for getting the capabilities.
|
|
364
370
|
* Use {@linkcode EventCommands.getLogEvents} instead to get the event history.
|
|
365
371
|
*/
|
|
366
372
|
async getSession() {
|
|
@@ -71,7 +71,7 @@ export class ExtensionCore {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// if the command module or method isn't part of our spec, reject
|
|
74
|
-
if (!this.bidiCommands[moduleName]
|
|
74
|
+
if (!(this.bidiCommands[moduleName]?.[methodName])) {
|
|
75
75
|
throw new errors.UnknownCommandError();
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -95,7 +95,7 @@ export async function configureApp(
|
|
|
95
95
|
let shouldUnzipApp = false;
|
|
96
96
|
let packageHash = null;
|
|
97
97
|
/** @type {import('axios').AxiosResponse['headers']|undefined} */
|
|
98
|
-
let headers
|
|
98
|
+
let headers;
|
|
99
99
|
/** @type {RemoteAppProps} */
|
|
100
100
|
const remoteAppProps = {
|
|
101
101
|
lastModified: null,
|
|
@@ -581,7 +581,7 @@ async function unzipApp(zipPath, dstRoot, supportedAppExtensions) {
|
|
|
581
581
|
*
|
|
582
582
|
* @param {string} app App link.
|
|
583
583
|
* @returns {string} Transformed app link or the original arg if
|
|
584
|
-
* no
|
|
584
|
+
* no transformation is needed.
|
|
585
585
|
*/
|
|
586
586
|
function toCacheKey(app) {
|
|
587
587
|
if (!isEnvOptionEnabled('APPIUM_APPS_CACHE_IGNORE_URL_QUERY') || !isSupportedUrl(app)) {
|
|
@@ -635,7 +635,7 @@ function isSupportedUrl(app) {
|
|
|
635
635
|
*
|
|
636
636
|
* @param {string} optionName Option name
|
|
637
637
|
* @param {boolean|null} [defaultValue=null] The value to return if the given env value
|
|
638
|
-
* is not set
|
|
638
|
+
* is not set explicitly
|
|
639
639
|
* @returns {boolean} True if the option is enabled
|
|
640
640
|
*/
|
|
641
641
|
function isEnvOptionEnabled(optionName, defaultValue = null) {
|
|
@@ -60,7 +60,7 @@ export function fixPythonContentType(basePath) {
|
|
|
60
60
|
// hack because python client library gives us wrong content-type
|
|
61
61
|
if (
|
|
62
62
|
new RegExp(`^${_.escapeRegExp(basePath)}`).test(req.path) &&
|
|
63
|
-
|
|
63
|
+
(req.headers['user-agent'] ?? '').startsWith('Python')
|
|
64
64
|
) {
|
|
65
65
|
if (req.headers['content-type'] === 'application/x-www-form-urlencoded') {
|
|
66
66
|
req.headers['content-type'] = 'application/json; charset=utf-8';
|
|
@@ -78,12 +78,17 @@ export function fixPythonContentType(basePath) {
|
|
|
78
78
|
* @returns {any}
|
|
79
79
|
*/
|
|
80
80
|
export function handleLogContext(req, res, next) {
|
|
81
|
-
const requestId = util.uuidV4();
|
|
81
|
+
const requestId = fetchHeaderValue(req, 'x-request-id') || util.uuidV4();
|
|
82
82
|
|
|
83
83
|
const sessionId = SESSION_ID_PATTERN.exec(req.url)?.[1];
|
|
84
84
|
const sessionInfo = sessionId ? {sessionId, sessionSignature: calcSignature(sessionId)} : {};
|
|
85
|
+
const isSensitiveHeaderValue = fetchHeaderValue(req, 'x-appium-is-sensitive');
|
|
85
86
|
|
|
86
|
-
log.updateAsyncContext({
|
|
87
|
+
log.updateAsyncContext({
|
|
88
|
+
requestId,
|
|
89
|
+
...sessionInfo,
|
|
90
|
+
isSensitive: ['true', '1', 'yes'].includes(_.toLower(isSensitiveHeaderValue)),
|
|
91
|
+
}, true);
|
|
87
92
|
|
|
88
93
|
return next();
|
|
89
94
|
}
|
|
@@ -181,6 +186,11 @@ export function catch404Handler(req, res) {
|
|
|
181
186
|
|
|
182
187
|
const SESSION_ID_PATTERN = /\/session\/([^/]+)/;
|
|
183
188
|
|
|
189
|
+
/**
|
|
190
|
+
* @param {import('express').Request} req
|
|
191
|
+
* @param {any} body
|
|
192
|
+
* @returns {any}
|
|
193
|
+
*/
|
|
184
194
|
function patchWithSessionId(req, body) {
|
|
185
195
|
const match = SESSION_ID_PATTERN.exec(req.url);
|
|
186
196
|
if (match) {
|
|
@@ -188,3 +198,14 @@ function patchWithSessionId(req, body) {
|
|
|
188
198
|
}
|
|
189
199
|
return body;
|
|
190
200
|
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @param {import('express').Request} req
|
|
204
|
+
* @param {string} name
|
|
205
|
+
* @returns {string | undefined}
|
|
206
|
+
*/
|
|
207
|
+
function fetchHeaderValue(req, name) {
|
|
208
|
+
return _.isArray(req.headers[name])
|
|
209
|
+
? req.headers[name][0]
|
|
210
|
+
: req.headers[name];
|
|
211
|
+
}
|
package/lib/express/server.js
CHANGED
|
@@ -233,7 +233,7 @@ function configureHttp({httpServer, reject, keepAliveTimeout, gracefulShutdownTi
|
|
|
233
233
|
}, gracefulShutdownTimeout);
|
|
234
234
|
httpServer.once('close', () => {
|
|
235
235
|
log.info(
|
|
236
|
-
`Appium HTTP server has been
|
|
236
|
+
`Appium HTTP server has been successfully closed after ` +
|
|
237
237
|
`${timer.getDuration().asMilliSeconds.toFixed(0)}ms`
|
|
238
238
|
);
|
|
239
239
|
clearTimeout(onTimeout);
|
|
@@ -311,7 +311,7 @@ export function normalizeBasePath(basePath) {
|
|
|
311
311
|
|
|
312
312
|
// likewise, ensure the path prefix does always START with /, unless the path
|
|
313
313
|
// is empty meaning no base path at all
|
|
314
|
-
if (basePath !== '' && basePath
|
|
314
|
+
if (basePath !== '' && !basePath.startsWith('/')) {
|
|
315
315
|
basePath = `/${basePath}`;
|
|
316
316
|
}
|
|
317
317
|
|
|
@@ -19,12 +19,12 @@ export const COMMAND_URLS_CONFLICTS = [
|
|
|
19
19
|
{
|
|
20
20
|
commandNames: ['getWindowHandles', 'getWindowHandle'],
|
|
21
21
|
jsonwpConverter(url) {
|
|
22
|
-
return
|
|
22
|
+
return url.endsWith('/window')
|
|
23
23
|
? url.replace(/\/window$/, '/window_handle')
|
|
24
24
|
: url.replace(/\/window\/handle(s?)$/, '/window_handle$1');
|
|
25
25
|
},
|
|
26
26
|
w3cConverter(url) {
|
|
27
|
-
return
|
|
27
|
+
return url.endsWith('/window_handle')
|
|
28
28
|
? url.replace(/\/window_handle$/, '/window')
|
|
29
29
|
: url.replace(/\/window_handles$/, '/window/handles');
|
|
30
30
|
},
|
|
@@ -236,7 +236,7 @@ export class JWProxy {
|
|
|
236
236
|
}
|
|
237
237
|
this.log.debug(`Got response with status ${status}: ${truncateBody(data)}`);
|
|
238
238
|
isResponseLogged = true;
|
|
239
|
-
const isSessionCreationRequest =
|
|
239
|
+
const isSessionCreationRequest = url.endsWith('/session') && method === 'POST';
|
|
240
240
|
if (isSessionCreationRequest) {
|
|
241
241
|
if (status === 200) {
|
|
242
242
|
this.sessionId = data.sessionId || (data.value || {}).sessionId;
|
package/lib/protocol/index.js
CHANGED
|
@@ -12,7 +12,13 @@ import {
|
|
|
12
12
|
validateExecuteMethodParams,
|
|
13
13
|
} from './protocol';
|
|
14
14
|
import {NO_SESSION_ID_COMMANDS, ALL_COMMANDS, METHOD_MAP, routeToCommandName} from './routes';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
errors,
|
|
17
|
+
isErrorType,
|
|
18
|
+
errorFromMJSONWPStatusCode,
|
|
19
|
+
errorFromW3CJsonCode,
|
|
20
|
+
getResponseForW3CError,
|
|
21
|
+
} from './errors';
|
|
16
22
|
|
|
17
23
|
export {
|
|
18
24
|
routeConfiguringFunction,
|
|
@@ -34,4 +40,5 @@ export {
|
|
|
34
40
|
GET_STATUS_COMMAND,
|
|
35
41
|
LIST_DRIVER_COMMANDS_COMMAND,
|
|
36
42
|
LIST_DRIVER_EXTENSIONS_COMMAND,
|
|
43
|
+
getResponseForW3CError,
|
|
37
44
|
};
|
package/lib/protocol/protocol.js
CHANGED
|
@@ -299,9 +299,9 @@ function buildHandler(app, method, path, spec, driver, isSessCmd) {
|
|
|
299
299
|
if (spec.deprecated && !deprecatedCommandsLogged.has(spec.command)) {
|
|
300
300
|
deprecatedCommandsLogged.add(spec.command);
|
|
301
301
|
getLogger(driver, req.params.sessionId).warn(
|
|
302
|
-
`
|
|
303
|
-
`version of Appium or your driver/plugin. Please use a different
|
|
304
|
-
`driver/plugin author to add explicit support for
|
|
302
|
+
`The ${method} ${path} endpoint has been deprecated and will be removed in a future ` +
|
|
303
|
+
`version of Appium or your driver/plugin. Please use a different API or contact the ` +
|
|
304
|
+
`driver/plugin author to add an explicit support for it.`
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
|
package/lib/protocol/routes.js
CHANGED
|
@@ -304,27 +304,38 @@ export const METHOD_MAP = /** @type {const} */ ({
|
|
|
304
304
|
// Appium specific
|
|
305
305
|
//
|
|
306
306
|
'/session/:sessionId/ime/available_engines': {
|
|
307
|
-
GET: {command: 'availableIMEEngines'},
|
|
307
|
+
GET: {command: 'availableIMEEngines', deprecated: true},
|
|
308
308
|
},
|
|
309
309
|
'/session/:sessionId/ime/active_engine': {
|
|
310
|
-
GET: {command: 'getActiveIMEEngine'},
|
|
310
|
+
GET: {command: 'getActiveIMEEngine', deprecated: true},
|
|
311
311
|
},
|
|
312
312
|
'/session/:sessionId/ime/activated': {
|
|
313
|
-
GET: {command: 'isIMEActivated'},
|
|
313
|
+
GET: {command: 'isIMEActivated', deprecated: true},
|
|
314
314
|
},
|
|
315
315
|
'/session/:sessionId/ime/deactivate': {
|
|
316
|
-
POST: {command: 'deactivateIMEEngine'},
|
|
316
|
+
POST: {command: 'deactivateIMEEngine', deprecated: true},
|
|
317
317
|
},
|
|
318
318
|
'/session/:sessionId/ime/activate': {
|
|
319
|
-
POST: {
|
|
319
|
+
POST: {
|
|
320
|
+
command: 'activateIMEEngine',
|
|
321
|
+
payloadParams: {required: ['engine']},
|
|
322
|
+
deprecated: true,
|
|
323
|
+
},
|
|
320
324
|
},
|
|
321
325
|
'/session/:sessionId/rotation': {
|
|
322
326
|
GET: {command: 'getRotation'},
|
|
323
327
|
POST: {command: 'setRotation', payloadParams: {required: ['x', 'y', 'z']}},
|
|
324
328
|
},
|
|
325
329
|
'/session/:sessionId/location': {
|
|
326
|
-
GET: {
|
|
327
|
-
|
|
330
|
+
GET: {
|
|
331
|
+
command: 'getGeoLocation',
|
|
332
|
+
deprecated: true,
|
|
333
|
+
},
|
|
334
|
+
POST: {
|
|
335
|
+
command: 'setGeoLocation',
|
|
336
|
+
payloadParams: {required: ['location']},
|
|
337
|
+
deprecated: true,
|
|
338
|
+
},
|
|
328
339
|
},
|
|
329
340
|
'/session/:sessionId/orientation': {
|
|
330
341
|
GET: {command: 'getOrientation'},
|
|
@@ -341,16 +352,18 @@ export const METHOD_MAP = /** @type {const} */ ({
|
|
|
341
352
|
GET: {command: 'getContexts'},
|
|
342
353
|
},
|
|
343
354
|
'/session/:sessionId/network_connection': {
|
|
344
|
-
GET: {command: 'getNetworkConnection'},
|
|
355
|
+
GET: {command: 'getNetworkConnection', deprecated: true},
|
|
345
356
|
POST: {
|
|
346
357
|
command: 'setNetworkConnection',
|
|
347
358
|
payloadParams: {unwrap: 'parameters', required: ['type']},
|
|
359
|
+
deprecated: true,
|
|
348
360
|
},
|
|
349
361
|
},
|
|
350
362
|
'/session/:sessionId/receive_async_response': {
|
|
351
363
|
POST: {
|
|
352
364
|
command: 'receiveAsyncResponse',
|
|
353
365
|
payloadParams: {required: ['status', 'value']},
|
|
366
|
+
deprecated: true,
|
|
354
367
|
},
|
|
355
368
|
},
|
|
356
369
|
'/appium/sessions': {
|
|
@@ -465,7 +478,7 @@ export const METHOD_MAP = /** @type {const} */ ({
|
|
|
465
478
|
// #endregion
|
|
466
479
|
|
|
467
480
|
//
|
|
468
|
-
// 3rd party vendor/
|
|
481
|
+
// 3rd party vendor/protocol support
|
|
469
482
|
//
|
|
470
483
|
// #region Selenium/Chromium browsers
|
|
471
484
|
'/session/:sessionId/se/log': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/base-driver",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.18.0",
|
|
4
4
|
"description": "Base driver class for Appium drivers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"test:types": "tsd"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@appium/support": "^6.
|
|
48
|
-
"@appium/types": "^0.
|
|
47
|
+
"@appium/support": "^6.1.1",
|
|
48
|
+
"@appium/types": "^0.26.0",
|
|
49
49
|
"@colors/colors": "1.6.0",
|
|
50
50
|
"async-lock": "1.4.1",
|
|
51
51
|
"asyncbox": "3.0.0",
|
|
52
|
-
"axios": "1.
|
|
52
|
+
"axios": "1.9.0",
|
|
53
53
|
"bluebird": "3.7.2",
|
|
54
54
|
"body-parser": "1.20.3",
|
|
55
55
|
"express": "4.21.2",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"path-to-regexp": "8.2.0",
|
|
63
63
|
"serve-favicon": "2.5.0",
|
|
64
64
|
"source-map-support": "0.5.21",
|
|
65
|
-
"type-fest": "4.
|
|
65
|
+
"type-fest": "4.41.0",
|
|
66
66
|
"validate.js": "0.13.1"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "c8fe4412525f7e1fa237813cf83fe7d98f0125eb",
|
|
79
79
|
"tsd": {
|
|
80
80
|
"directory": "test/types"
|
|
81
81
|
}
|