@appium/base-driver 9.13.1 → 9.14.1
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/commands/bidi.d.ts.map +1 -1
- package/build/lib/basedriver/commands/bidi.js +16 -0
- package/build/lib/basedriver/commands/bidi.js.map +1 -1
- package/build/lib/basedriver/commands/mixin.d.ts.map +1 -1
- package/build/lib/basedriver/commands/mixin.js +0 -1
- package/build/lib/basedriver/commands/mixin.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +4 -1
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +6 -4
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +30 -14
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/driver.js +24 -2
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/helpers.d.ts.map +1 -1
- package/build/lib/basedriver/helpers.js +3 -2
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/express/express-logging.js +1 -1
- package/build/lib/express/express-logging.js.map +1 -1
- package/build/lib/express/server.d.ts.map +1 -1
- package/build/lib/express/server.js +1 -1
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/express/websocket.js +1 -2
- package/build/lib/express/websocket.js.map +1 -1
- package/build/lib/index.js +1 -1
- package/build/lib/index.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/bidi-commands.d.ts +9 -3
- package/build/lib/protocol/bidi-commands.js +4 -0
- package/build/lib/protocol/bidi-commands.js.map +1 -1
- package/build/lib/protocol/errors.d.ts +3 -9
- package/build/lib/protocol/errors.d.ts.map +1 -1
- package/build/lib/protocol/errors.js +4 -6
- package/build/lib/protocol/errors.js.map +1 -1
- package/lib/basedriver/commands/bidi.ts +15 -1
- package/lib/basedriver/commands/find.ts +1 -1
- package/lib/basedriver/commands/mixin.ts +0 -1
- package/lib/basedriver/commands/timeout.ts +5 -1
- package/lib/basedriver/core.ts +35 -14
- package/lib/basedriver/driver.ts +1 -1
- package/lib/basedriver/helpers.js +3 -2
- package/lib/express/express-logging.js +1 -1
- package/lib/express/server.js +2 -1
- package/lib/express/websocket.js +2 -2
- package/lib/index.js +1 -1
- package/lib/jsonwp-proxy/proxy.js +1 -1
- package/lib/protocol/bidi-commands.js +4 -0
- package/lib/protocol/errors.js +4 -6
- package/package.json +7 -7
package/lib/express/server.js
CHANGED
|
@@ -60,7 +60,7 @@ async function createServer (app, cliArgs) {
|
|
|
60
60
|
}
|
|
61
61
|
const [cert, key] = await B.all(certKey.map((p) => fs.readFile(p, 'utf8')));
|
|
62
62
|
log.debug('Enabling TLS/SPDY on the server using the provided certificate');
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
return require('spdy').createServer({
|
|
65
65
|
cert,
|
|
66
66
|
key,
|
|
@@ -151,6 +151,7 @@ function configureServer({
|
|
|
151
151
|
|
|
152
152
|
// set up static assets
|
|
153
153
|
app.use(favicon(path.resolve(STATIC_DIR, 'favicon.ico')));
|
|
154
|
+
// eslint-disable-next-line import/no-named-as-default-member
|
|
154
155
|
app.use(express.static(STATIC_DIR));
|
|
155
156
|
|
|
156
157
|
// crash routes, for testing
|
package/lib/express/websocket.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
import B from 'bluebird';
|
|
4
4
|
|
|
@@ -41,7 +41,7 @@ async function removeWebSocketHandler(handlerPathname) {
|
|
|
41
41
|
client.terminate();
|
|
42
42
|
}
|
|
43
43
|
return true;
|
|
44
|
-
} catch
|
|
44
|
+
} catch {
|
|
45
45
|
// ignore
|
|
46
46
|
} finally {
|
|
47
47
|
delete this.webSocketsMapping[handlerPathname];
|
package/lib/index.js
CHANGED
package/lib/protocol/errors.js
CHANGED
|
@@ -60,16 +60,14 @@ export class ProtocolError extends BaseError {
|
|
|
60
60
|
* Get the Bidi protocol version of an error
|
|
61
61
|
* @param {string|number} id - the id used in the request for which this error forms the response
|
|
62
62
|
* @see https://w3c.github.io/webdriver-bidi/#protocol-definition
|
|
63
|
-
* @returns The object conforming to the shape of a BiDi error response
|
|
63
|
+
* @returns {import('@appium/types').ErrorBiDiCommandResponse} The object conforming to the shape of a BiDi error response
|
|
64
64
|
*/
|
|
65
65
|
bidiErrObject(id) {
|
|
66
66
|
// if we don't have an id, the client didn't send one, so we have nothing to send back.
|
|
67
|
-
// send back
|
|
68
|
-
|
|
69
|
-
id = '';
|
|
70
|
-
}
|
|
67
|
+
// send back zero rather than making something up
|
|
68
|
+
const intId = /** @type {number} */ (_.isInteger(id) ? id : (parseInt(`${id}`, 10) || 0));
|
|
71
69
|
return {
|
|
72
|
-
id,
|
|
70
|
+
id: intId,
|
|
73
71
|
type: 'error',
|
|
74
72
|
error: this.error,
|
|
75
73
|
stacktrace: this.stacktrace,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appium/base-driver",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.14.1",
|
|
4
4
|
"description": "Base driver class for Appium drivers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"test:types": "tsd"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@appium/support": "^6.0.
|
|
48
|
-
"@appium/types": "^0.
|
|
47
|
+
"@appium/support": "^6.0.2",
|
|
48
|
+
"@appium/types": "^0.23.0",
|
|
49
49
|
"@colors/colors": "1.6.0",
|
|
50
50
|
"@types/async-lock": "1.4.2",
|
|
51
51
|
"@types/bluebird": "3.5.42",
|
|
52
52
|
"@types/express": "5.0.0",
|
|
53
|
-
"@types/lodash": "4.17.
|
|
53
|
+
"@types/lodash": "4.17.14",
|
|
54
54
|
"@types/method-override": "3.0.0",
|
|
55
55
|
"@types/serve-favicon": "2.5.7",
|
|
56
56
|
"async-lock": "1.4.1",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"axios": "1.7.9",
|
|
59
59
|
"bluebird": "3.7.2",
|
|
60
60
|
"body-parser": "1.20.3",
|
|
61
|
-
"express": "4.21.
|
|
61
|
+
"express": "4.21.2",
|
|
62
62
|
"http-status-codes": "2.3.0",
|
|
63
63
|
"lodash": "4.17.21",
|
|
64
64
|
"lru-cache": "10.4.3",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"path-to-regexp": "8.2.0",
|
|
68
68
|
"serve-favicon": "2.5.0",
|
|
69
69
|
"source-map-support": "0.5.21",
|
|
70
|
-
"type-fest": "4.
|
|
70
|
+
"type-fest": "4.31.0",
|
|
71
71
|
"validate.js": "0.13.1"
|
|
72
72
|
},
|
|
73
73
|
"optionalDependencies": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "3467f32c8e3618db05b6b210544cfdc6a57bb73c",
|
|
84
84
|
"tsd": {
|
|
85
85
|
"directory": "test/types"
|
|
86
86
|
}
|