@appium/base-driver 8.7.2 → 9.0.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 +11 -163
- package/build/lib/basedriver/capabilities.d.ts.map +1 -1
- package/build/lib/basedriver/capabilities.js +354 -236
- package/build/lib/basedriver/capabilities.js.map +1 -1
- package/build/lib/basedriver/commands/event.d.ts +7 -6
- package/build/lib/basedriver/commands/event.d.ts.map +1 -1
- package/build/lib/basedriver/commands/event.js +55 -35
- package/build/lib/basedriver/commands/event.js.map +1 -1
- package/build/lib/basedriver/commands/execute.d.ts +7 -6
- package/build/lib/basedriver/commands/execute.d.ts.map +1 -1
- package/build/lib/basedriver/commands/execute.js +66 -58
- package/build/lib/basedriver/commands/execute.js.map +1 -1
- package/build/lib/basedriver/commands/find.d.ts +9 -7
- package/build/lib/basedriver/commands/find.d.ts.map +1 -1
- package/build/lib/basedriver/commands/find.js +102 -54
- package/build/lib/basedriver/commands/find.js.map +1 -1
- package/build/lib/basedriver/commands/index.d.ts +3 -7
- package/build/lib/basedriver/commands/index.d.ts.map +1 -1
- package/build/lib/basedriver/commands/index.js +30 -33
- package/build/lib/basedriver/commands/index.js.map +1 -1
- package/build/lib/basedriver/commands/log.d.ts +8 -9
- package/build/lib/basedriver/commands/log.d.ts.map +1 -1
- package/build/lib/basedriver/commands/log.js +54 -38
- package/build/lib/basedriver/commands/log.js.map +1 -1
- package/build/lib/basedriver/commands/session.d.ts +7 -6
- package/build/lib/basedriver/commands/session.d.ts.map +1 -1
- package/build/lib/basedriver/commands/session.js +46 -39
- package/build/lib/basedriver/commands/session.js.map +1 -1
- package/build/lib/basedriver/commands/settings.d.ts +7 -7
- package/build/lib/basedriver/commands/settings.d.ts.map +1 -1
- package/build/lib/basedriver/commands/settings.js +35 -28
- package/build/lib/basedriver/commands/settings.js.map +1 -1
- package/build/lib/basedriver/commands/timeout.d.ts +7 -5
- package/build/lib/basedriver/commands/timeout.d.ts.map +1 -1
- package/build/lib/basedriver/commands/timeout.js +144 -162
- package/build/lib/basedriver/commands/timeout.js.map +1 -1
- package/build/lib/basedriver/core.d.ts +6 -157
- package/build/lib/basedriver/core.d.ts.map +1 -1
- package/build/lib/basedriver/core.js +361 -230
- package/build/lib/basedriver/core.js.map +1 -1
- package/build/lib/basedriver/desired-caps.js +80 -110
- package/build/lib/basedriver/desired-caps.js.map +1 -1
- package/build/lib/basedriver/device-settings.js +57 -62
- package/build/lib/basedriver/device-settings.js.map +1 -1
- package/build/lib/basedriver/driver.d.ts +21 -267
- package/build/lib/basedriver/driver.d.ts.map +1 -1
- package/build/lib/basedriver/driver.js +362 -258
- package/build/lib/basedriver/driver.js.map +1 -1
- package/build/lib/basedriver/helpers.js +500 -495
- package/build/lib/basedriver/helpers.js.map +1 -1
- package/build/lib/basedriver/logger.d.ts +1 -1
- package/build/lib/basedriver/logger.d.ts.map +1 -1
- package/build/lib/basedriver/logger.js +5 -15
- package/build/lib/basedriver/logger.js.map +1 -1
- package/build/lib/constants.js +14 -14
- package/build/lib/constants.js.map +1 -1
- package/build/lib/express/crash.js +8 -15
- package/build/lib/express/crash.js.map +1 -1
- package/build/lib/express/express-logging.js +49 -59
- package/build/lib/express/express-logging.js.map +1 -1
- package/build/lib/express/idempotency.js +125 -177
- package/build/lib/express/idempotency.js.map +1 -1
- package/build/lib/express/logger.d.ts +1 -1
- package/build/lib/express/logger.d.ts.map +1 -1
- package/build/lib/express/logger.js +5 -15
- package/build/lib/express/logger.js.map +1 -1
- package/build/lib/express/middleware.js +82 -107
- package/build/lib/express/middleware.js.map +1 -1
- package/build/lib/express/server.d.ts +17 -5
- package/build/lib/express/server.d.ts.map +1 -1
- package/build/lib/express/server.js +259 -224
- package/build/lib/express/server.js.map +1 -1
- package/build/lib/express/static.js +64 -81
- package/build/lib/express/static.js.map +1 -1
- package/build/lib/express/websocket.js +115 -87
- package/build/lib/express/websocket.js.map +1 -1
- package/build/lib/helpers/capabilities.d.ts +1 -59
- package/build/lib/helpers/capabilities.d.ts.map +1 -1
- package/build/lib/helpers/capabilities.js +72 -69
- package/build/lib/helpers/capabilities.js.map +1 -1
- package/build/lib/index.js +64 -180
- package/build/lib/index.js.map +1 -1
- package/build/lib/jsonwp-proxy/protocol-converter.js +215 -227
- package/build/lib/jsonwp-proxy/protocol-converter.js.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.d.ts.map +1 -1
- package/build/lib/jsonwp-proxy/proxy.js +355 -393
- package/build/lib/jsonwp-proxy/proxy.js.map +1 -1
- package/build/lib/jsonwp-status/status.js +119 -130
- package/build/lib/jsonwp-status/status.js.map +1 -1
- package/build/lib/protocol/errors.d.ts +135 -32
- package/build/lib/protocol/errors.d.ts.map +1 -1
- package/build/lib/protocol/errors.js +871 -919
- package/build/lib/protocol/errors.js.map +1 -1
- package/build/lib/protocol/helpers.js +37 -37
- package/build/lib/protocol/helpers.js.map +1 -1
- package/build/lib/protocol/index.js +22 -109
- package/build/lib/protocol/index.js.map +1 -1
- package/build/lib/protocol/protocol.js +394 -350
- package/build/lib/protocol/protocol.js.map +1 -1
- package/build/lib/protocol/routes.d.ts +1238 -4
- package/build/lib/protocol/routes.d.ts.map +1 -1
- package/build/lib/protocol/routes.js +964 -1327
- package/build/lib/protocol/routes.js.map +1 -1
- package/build/lib/protocol/validators.js +32 -39
- package/build/lib/protocol/validators.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/basedriver/capabilities.js +80 -39
- package/lib/basedriver/commands/event.js +10 -5
- package/lib/basedriver/commands/execute.js +14 -9
- package/lib/basedriver/commands/find.js +18 -12
- package/lib/basedriver/commands/index.js +21 -16
- package/lib/basedriver/commands/log.js +24 -18
- package/lib/basedriver/commands/session.js +10 -5
- package/lib/basedriver/commands/settings.js +9 -6
- package/lib/basedriver/commands/timeout.js +10 -4
- package/lib/basedriver/core.js +2 -3
- package/lib/basedriver/driver.js +29 -18
- package/lib/express/server.js +6 -3
- package/lib/protocol/errors.js +155 -44
- package/lib/protocol/routes.js +11 -7
- package/package.json +14 -16
|
@@ -1,77 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
exports
|
|
7
|
-
exports.isW3cCaps =
|
|
8
|
-
|
|
9
|
-
require("source-map-support/register");
|
|
10
|
-
|
|
11
|
-
var _lodash = _interopRequireDefault(require("lodash"));
|
|
12
|
-
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
|
|
2
|
+
// @ts-check
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.fixCaps = exports.isW3cCaps = void 0;
|
|
8
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
15
9
|
function isW3cCaps(caps) {
|
|
16
|
-
|
|
10
|
+
if (!lodash_1.default.isPlainObject(caps)) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const isFirstMatchValid = () => lodash_1.default.isArray(caps.firstMatch) &&
|
|
14
|
+
!lodash_1.default.isEmpty(caps.firstMatch) &&
|
|
15
|
+
lodash_1.default.every(caps.firstMatch, lodash_1.default.isPlainObject);
|
|
16
|
+
const isAlwaysMatchValid = () => lodash_1.default.isPlainObject(caps.alwaysMatch);
|
|
17
|
+
if (lodash_1.default.has(caps, 'firstMatch') && lodash_1.default.has(caps, 'alwaysMatch')) {
|
|
18
|
+
return isFirstMatchValid() && isAlwaysMatchValid();
|
|
19
|
+
}
|
|
20
|
+
if (lodash_1.default.has(caps, 'firstMatch')) {
|
|
21
|
+
return isFirstMatchValid();
|
|
22
|
+
}
|
|
23
|
+
if (lodash_1.default.has(caps, 'alwaysMatch')) {
|
|
24
|
+
return isAlwaysMatchValid();
|
|
25
|
+
}
|
|
17
26
|
return false;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const isFirstMatchValid = () => _lodash.default.isArray(caps.firstMatch) && !_lodash.default.isEmpty(caps.firstMatch) && _lodash.default.every(caps.firstMatch, _lodash.default.isPlainObject);
|
|
21
|
-
|
|
22
|
-
const isAlwaysMatchValid = () => _lodash.default.isPlainObject(caps.alwaysMatch);
|
|
23
|
-
|
|
24
|
-
if (_lodash.default.has(caps, 'firstMatch') && _lodash.default.has(caps, 'alwaysMatch')) {
|
|
25
|
-
return isFirstMatchValid() && isAlwaysMatchValid();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (_lodash.default.has(caps, 'firstMatch')) {
|
|
29
|
-
return isFirstMatchValid();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (_lodash.default.has(caps, 'alwaysMatch')) {
|
|
33
|
-
return isAlwaysMatchValid();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return false;
|
|
37
27
|
}
|
|
38
|
-
|
|
28
|
+
exports.isW3cCaps = isW3cCaps;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @template {Constraints} C
|
|
32
|
+
* @param {any} oldCaps
|
|
33
|
+
* @param {C} desiredCapConstraints
|
|
34
|
+
* @param {AppiumLogger} log
|
|
35
|
+
* @returns {Capabilities<C>}
|
|
36
|
+
*/
|
|
39
37
|
function fixCaps(oldCaps, desiredCapConstraints, log) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
38
|
+
let caps = lodash_1.default.clone(oldCaps);
|
|
39
|
+
// boolean capabilities can be passed in as strings 'false' and 'true'
|
|
40
|
+
// which we want to translate into boolean values
|
|
41
|
+
let booleanCaps = lodash_1.default.keys(lodash_1.default.pickBy(desiredCapConstraints, (k) => k.isBoolean === true));
|
|
42
|
+
for (let cap of booleanCaps) {
|
|
43
|
+
let value = oldCaps[cap];
|
|
44
|
+
if (lodash_1.default.isString(value)) {
|
|
45
|
+
value = value.toLowerCase();
|
|
46
|
+
if (value === 'true' || value === 'false') {
|
|
47
|
+
log.warn(`Capability '${cap}' changed from string to boolean. This may cause unexpected behavior`);
|
|
48
|
+
caps[cap] = value === 'true';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
54
51
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
log.warn(`Capability '${cap}' changed from string ('${value}') to integer (${newValue}). This may cause unexpected behavior`);
|
|
71
|
-
caps[cap] = newValue;
|
|
52
|
+
// int capabilities are often sent in as strings by frameworks
|
|
53
|
+
let intCaps = /** @type {import('type-fest').StringKeyOf<typeof caps>[]} */ (lodash_1.default.keys(lodash_1.default.pickBy(desiredCapConstraints, (k) => k.isNumber === true)));
|
|
54
|
+
for (let cap of intCaps) {
|
|
55
|
+
let value = oldCaps[cap];
|
|
56
|
+
if (lodash_1.default.isString(value)) {
|
|
57
|
+
value = value.trim();
|
|
58
|
+
let newValue = parseInt(value, 10);
|
|
59
|
+
if (value !== `${newValue}`) {
|
|
60
|
+
newValue = parseFloat(value);
|
|
61
|
+
}
|
|
62
|
+
log.warn(`Capability '${cap}' changed from string ('${value}') to integer (${newValue}). This may cause unexpected behavior`);
|
|
63
|
+
caps[cap] = newValue;
|
|
64
|
+
}
|
|
72
65
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return caps;
|
|
66
|
+
return caps;
|
|
76
67
|
}
|
|
77
|
-
|
|
68
|
+
exports.fixCaps = fixCaps;
|
|
69
|
+
/**
|
|
70
|
+
* @typedef {import('@appium/types').Constraints} Constraints
|
|
71
|
+
* @typedef {import('@appium/types').AppiumLogger} AppiumLogger
|
|
72
|
+
* @typedef {import('@appium/types').StringRecord} StringRecord
|
|
73
|
+
* @typedef {import('@appium/types').BaseDriverCapConstraints} BaseDriverCapConstraints
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* @template {Constraints} [C=BaseDriverCapConstraints]
|
|
77
|
+
* @template {StringRecord|void} [Extra=void]
|
|
78
|
+
* @typedef {import('@appium/types').Capabilities<C, Extra>} Capabilities
|
|
79
|
+
*/
|
|
80
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../../lib/helpers/capabilities.js"],"names":[],"mappings":"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"}
|
package/build/lib/index.js
CHANGED
|
@@ -1,182 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
BaseDriver: true,
|
|
8
|
-
DriverCore: true,
|
|
9
|
-
DeviceSettings: true,
|
|
10
|
-
errorFromCode: true,
|
|
11
|
-
DEFAULT_BASE_PATH: true,
|
|
12
|
-
PROTOCOLS: true,
|
|
13
|
-
STATIC_DIR: true,
|
|
14
|
-
server: true,
|
|
15
|
-
normalizeBasePath: true,
|
|
16
|
-
JWProxy: true,
|
|
17
|
-
getSummaryByCode: true,
|
|
18
|
-
statusCodes: true,
|
|
19
|
-
PREFIXED_APPIUM_OPTS_CAP: true,
|
|
20
|
-
STANDARD_CAPS: true,
|
|
21
|
-
processCapabilities: true,
|
|
22
|
-
isStandardCap: true,
|
|
23
|
-
validateCaps: true,
|
|
24
|
-
DEFAULT_WS_PATHNAME_PREFIX: true
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "BaseDriver", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return _driver.BaseDriver;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "DEFAULT_BASE_PATH", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _constants.DEFAULT_BASE_PATH;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(exports, "DEFAULT_WS_PATHNAME_PREFIX", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _websocket.DEFAULT_WS_PATHNAME_PREFIX;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "DeviceSettings", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _deviceSettings.DeviceSettings;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(exports, "DriverCore", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function () {
|
|
53
|
-
return _core.DriverCore;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(exports, "JWProxy", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function () {
|
|
59
|
-
return _proxy.JWProxy;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(exports, "PREFIXED_APPIUM_OPTS_CAP", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return _capabilities.PREFIXED_APPIUM_OPTS_CAP;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(exports, "PROTOCOLS", {
|
|
69
|
-
enumerable: true,
|
|
70
|
-
get: function () {
|
|
71
|
-
return _constants.PROTOCOLS;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(exports, "STANDARD_CAPS", {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () {
|
|
77
|
-
return _capabilities.STANDARD_CAPS;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(exports, "STATIC_DIR", {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return _static.STATIC_DIR;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
exports.default = void 0;
|
|
87
|
-
Object.defineProperty(exports, "errorFromCode", {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _protocol.errorFromMJSONWPStatusCode;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
Object.defineProperty(exports, "getSummaryByCode", {
|
|
94
|
-
enumerable: true,
|
|
95
|
-
get: function () {
|
|
96
|
-
return _status.getSummaryByCode;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
Object.defineProperty(exports, "isStandardCap", {
|
|
100
|
-
enumerable: true,
|
|
101
|
-
get: function () {
|
|
102
|
-
return _capabilities.isStandardCap;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
Object.defineProperty(exports, "normalizeBasePath", {
|
|
106
|
-
enumerable: true,
|
|
107
|
-
get: function () {
|
|
108
|
-
return _server.normalizeBasePath;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
Object.defineProperty(exports, "processCapabilities", {
|
|
112
|
-
enumerable: true,
|
|
113
|
-
get: function () {
|
|
114
|
-
return _capabilities.processCapabilities;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
Object.defineProperty(exports, "server", {
|
|
118
|
-
enumerable: true,
|
|
119
|
-
get: function () {
|
|
120
|
-
return _server.server;
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
Object.defineProperty(exports, "statusCodes", {
|
|
124
|
-
enumerable: true,
|
|
125
|
-
get: function () {
|
|
126
|
-
return _status.codes;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(exports, "validateCaps", {
|
|
130
|
-
enumerable: true,
|
|
131
|
-
get: function () {
|
|
132
|
-
return _capabilities.validateCaps;
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
require("source-map-support/register");
|
|
137
|
-
|
|
138
|
-
var _bluebird = _interopRequireDefault(require("bluebird"));
|
|
139
|
-
|
|
140
|
-
var _driver = require("./basedriver/driver");
|
|
141
|
-
|
|
142
|
-
var _core = require("./basedriver/core");
|
|
143
|
-
|
|
144
|
-
var _deviceSettings = require("./basedriver/device-settings");
|
|
145
|
-
|
|
146
|
-
var _protocol = require("./protocol");
|
|
147
|
-
|
|
148
|
-
Object.keys(_protocol).forEach(function (key) {
|
|
149
|
-
if (key === "default" || key === "__esModule") return;
|
|
150
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
151
|
-
if (key in exports && exports[key] === _protocol[key]) return;
|
|
152
|
-
Object.defineProperty(exports, key, {
|
|
153
|
-
enumerable: true,
|
|
154
|
-
get: function () {
|
|
155
|
-
return _protocol[key];
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
156
7
|
}
|
|
157
|
-
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
exports.default =
|
|
182
|
-
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.DEFAULT_WS_PATHNAME_PREFIX = exports.validateCaps = exports.isStandardCap = exports.processCapabilities = exports.STANDARD_CAPS = exports.PREFIXED_APPIUM_OPTS_CAP = exports.statusCodes = exports.getSummaryByCode = exports.JWProxy = exports.normalizeBasePath = exports.server = exports.STATIC_DIR = exports.PROTOCOLS = exports.DEFAULT_BASE_PATH = exports.errorFromCode = exports.BaseDriver = exports.DeviceSettings = exports.DriverCore = void 0;
|
|
21
|
+
const bluebird_1 = __importDefault(require("bluebird"));
|
|
22
|
+
bluebird_1.default.config({
|
|
23
|
+
cancellation: true,
|
|
24
|
+
});
|
|
25
|
+
// BaseDriver exports
|
|
26
|
+
const driver_1 = require("./basedriver/driver");
|
|
27
|
+
Object.defineProperty(exports, "BaseDriver", { enumerable: true, get: function () { return driver_1.BaseDriver; } });
|
|
28
|
+
var core_1 = require("./basedriver/core");
|
|
29
|
+
Object.defineProperty(exports, "DriverCore", { enumerable: true, get: function () { return core_1.DriverCore; } });
|
|
30
|
+
var device_settings_1 = require("./basedriver/device-settings");
|
|
31
|
+
Object.defineProperty(exports, "DeviceSettings", { enumerable: true, get: function () { return device_settings_1.DeviceSettings; } });
|
|
32
|
+
exports.default = driver_1.BaseDriver;
|
|
33
|
+
// MJSONWP exports
|
|
34
|
+
__exportStar(require("./protocol"), exports);
|
|
35
|
+
var protocol_1 = require("./protocol");
|
|
36
|
+
Object.defineProperty(exports, "errorFromCode", { enumerable: true, get: function () { return protocol_1.errorFromMJSONWPStatusCode; } });
|
|
37
|
+
var constants_1 = require("./constants");
|
|
38
|
+
Object.defineProperty(exports, "DEFAULT_BASE_PATH", { enumerable: true, get: function () { return constants_1.DEFAULT_BASE_PATH; } });
|
|
39
|
+
Object.defineProperty(exports, "PROTOCOLS", { enumerable: true, get: function () { return constants_1.PROTOCOLS; } });
|
|
40
|
+
// Express exports
|
|
41
|
+
var static_1 = require("./express/static");
|
|
42
|
+
Object.defineProperty(exports, "STATIC_DIR", { enumerable: true, get: function () { return static_1.STATIC_DIR; } });
|
|
43
|
+
var server_1 = require("./express/server");
|
|
44
|
+
Object.defineProperty(exports, "server", { enumerable: true, get: function () { return server_1.server; } });
|
|
45
|
+
Object.defineProperty(exports, "normalizeBasePath", { enumerable: true, get: function () { return server_1.normalizeBasePath; } });
|
|
46
|
+
// jsonwp-proxy exports
|
|
47
|
+
var proxy_1 = require("./jsonwp-proxy/proxy");
|
|
48
|
+
Object.defineProperty(exports, "JWProxy", { enumerable: true, get: function () { return proxy_1.JWProxy; } });
|
|
49
|
+
// jsonwp-status exports
|
|
50
|
+
var status_1 = require("./jsonwp-status/status");
|
|
51
|
+
Object.defineProperty(exports, "getSummaryByCode", { enumerable: true, get: function () { return status_1.getSummaryByCode; } });
|
|
52
|
+
Object.defineProperty(exports, "statusCodes", { enumerable: true, get: function () { return status_1.codes; } });
|
|
53
|
+
// W3C capabilities parser
|
|
54
|
+
var capabilities_1 = require("./basedriver/capabilities");
|
|
55
|
+
Object.defineProperty(exports, "PREFIXED_APPIUM_OPTS_CAP", { enumerable: true, get: function () { return capabilities_1.PREFIXED_APPIUM_OPTS_CAP; } });
|
|
56
|
+
Object.defineProperty(exports, "STANDARD_CAPS", { enumerable: true, get: function () { return capabilities_1.STANDARD_CAPS; } });
|
|
57
|
+
Object.defineProperty(exports, "processCapabilities", { enumerable: true, get: function () { return capabilities_1.processCapabilities; } });
|
|
58
|
+
Object.defineProperty(exports, "isStandardCap", { enumerable: true, get: function () { return capabilities_1.isStandardCap; } });
|
|
59
|
+
Object.defineProperty(exports, "validateCaps", { enumerable: true, get: function () { return capabilities_1.validateCaps; } });
|
|
60
|
+
// Web socket helpers
|
|
61
|
+
var websocket_1 = require("./express/websocket");
|
|
62
|
+
Object.defineProperty(exports, "DEFAULT_WS_PATHNAME_PREFIX", { enumerable: true, get: function () { return websocket_1.DEFAULT_WS_PATHNAME_PREFIX; } });
|
|
63
|
+
/**
|
|
64
|
+
* @typedef {import('./express/server').ServerOpts} ServerOpts
|
|
65
|
+
*/
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,wDAAyB;AAEzB,kBAAC,CAAC,MAAM,CAAC;IACP,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEH,qBAAqB;AACrB,gDAA+C;AAIvC,2FAJA,mBAAU,OAIA;AAHlB,0CAA6C;AAArC,kGAAA,UAAU,OAAA;AAClB,gEAA4D;AAApD,iHAAA,cAAc,OAAA;AAGtB,kBAAe,mBAAU,CAAC;AAE1B,kBAAkB;AAClB,6CAA2B;AAC3B,uCAAuE;AAA/D,yGAAA,0BAA0B,OAAiB;AACnD,yCAAyD;AAAjD,8GAAA,iBAAiB,OAAA;AAAE,sGAAA,SAAS,OAAA;AAEpC,kBAAkB;AAClB,2CAA4C;AAApC,oGAAA,UAAU,OAAA;AAClB,2CAA2D;AAAnD,gGAAA,MAAM,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAEjC,uBAAuB;AACvB,8CAA6C;AAArC,gGAAA,OAAO,OAAA;AAEf,wBAAwB;AACxB,iDAA8E;AAAtE,0GAAA,gBAAgB,OAAA;AAAE,qGAAA,KAAK,OAAe;AAE9C,0BAA0B;AAC1B,0DAMmC;AALjC,wHAAA,wBAAwB,OAAA;AACxB,6GAAA,aAAa,OAAA;AACb,mHAAA,mBAAmB,OAAA;AACnB,6GAAA,aAAa,OAAA;AACb,4GAAA,YAAY,OAAA;AAGd,qBAAqB;AACrB,iDAA+D;AAAvD,uHAAA,0BAA0B,OAAA;AAElC;;GAEG"}
|