appium 3.0.1 → 3.1.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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/build/lib/appium.js +62 -12
  3. package/build/lib/appium.js.map +1 -1
  4. package/build/lib/cli/driver-command.d.ts +2 -0
  5. package/build/lib/cli/driver-command.d.ts.map +1 -1
  6. package/build/lib/cli/driver-command.js +2 -0
  7. package/build/lib/cli/driver-command.js.map +1 -1
  8. package/build/lib/cli/extension-command.d.ts +0 -4
  9. package/build/lib/cli/extension-command.d.ts.map +1 -1
  10. package/build/lib/cli/extension-command.js +22 -8
  11. package/build/lib/cli/extension-command.js.map +1 -1
  12. package/build/lib/cli/plugin-command.d.ts +2 -0
  13. package/build/lib/cli/plugin-command.d.ts.map +1 -1
  14. package/build/lib/cli/plugin-command.js +2 -0
  15. package/build/lib/cli/plugin-command.js.map +1 -1
  16. package/build/lib/cli/setup-command.d.ts.map +1 -1
  17. package/build/lib/cli/setup-command.js +1 -1
  18. package/build/lib/cli/setup-command.js.map +1 -1
  19. package/build/lib/cli/utils.d.ts +15 -0
  20. package/build/lib/cli/utils.d.ts.map +1 -1
  21. package/build/lib/cli/utils.js +15 -0
  22. package/build/lib/cli/utils.js.map +1 -1
  23. package/build/lib/extension/driver-config.js +16 -11
  24. package/build/lib/extension/driver-config.js.map +1 -1
  25. package/build/lib/extension/extension-config.js +23 -20
  26. package/build/lib/extension/extension-config.js.map +1 -1
  27. package/build/lib/extension/manifest.js +106 -120
  28. package/build/lib/extension/manifest.js.map +1 -1
  29. package/build/lib/extension/plugin-config.js +11 -11
  30. package/build/lib/extension/plugin-config.js.map +1 -1
  31. package/build/lib/inspector-commands.js.map +1 -1
  32. package/build/lib/main.d.ts.map +1 -1
  33. package/build/lib/main.js +6 -4
  34. package/build/lib/main.js.map +1 -1
  35. package/build/lib/schema/arg-spec.js +47 -0
  36. package/build/lib/schema/arg-spec.js.map +1 -1
  37. package/build/lib/schema/schema.js +92 -93
  38. package/build/lib/schema/schema.js.map +1 -1
  39. package/build/lib/utils.d.ts +0 -1
  40. package/build/lib/utils.d.ts.map +1 -1
  41. package/build/lib/utils.js +0 -4
  42. package/build/lib/utils.js.map +1 -1
  43. package/lib/cli/driver-command.js +2 -0
  44. package/lib/cli/extension-command.js +7 -8
  45. package/lib/cli/plugin-command.js +2 -0
  46. package/lib/cli/setup-command.js +1 -1
  47. package/lib/cli/utils.js +17 -0
  48. package/lib/inspector-commands.ts +1 -1
  49. package/lib/main.js +7 -5
  50. package/lib/utils.js +0 -5
  51. package/package.json +14 -14
package/lib/main.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  } from './config';
28
28
  import {readConfigFile} from './config-file';
29
29
  import {loadExtensions, getActivePlugins, getActiveDrivers} from './extension';
30
- import {SERVER_SUBCOMMAND, LONG_STACKTRACE_LIMIT} from './constants';
30
+ import {SERVER_SUBCOMMAND, LONG_STACKTRACE_LIMIT, BIDI_BASE_PATH} from './constants';
31
31
  import registerNode from './grid-register';
32
32
  import {getDefaultsForSchema, validate as validateSchema} from './schema/schema';
33
33
  import {
@@ -400,6 +400,7 @@ async function main(args) {
400
400
  extraMethodMap,
401
401
  cliArgs: parsedArgs,
402
402
  };
403
+ const normalizedBasePath = normalizeBasePath(parsedArgs.basePath);
403
404
  for (const timeoutArgName of ['keepAliveTimeout', 'requestTimeout']) {
404
405
  if (_.isInteger(parsedArgs[timeoutArgName])) {
405
406
  serverOpts[timeoutArgName] = parsedArgs[timeoutArgName] * 1000;
@@ -411,8 +412,9 @@ async function main(args) {
411
412
  bidiServer.on('error', appiumDriver.onBidiServerError.bind(appiumDriver));
412
413
  try {
413
414
  server = await baseServer(serverOpts);
414
- server.addWebSocketHandler('/bidi', bidiServer);
415
- server.addWebSocketHandler('/bidi/:sessionId', bidiServer);
415
+ const bidiBasePath = `${normalizedBasePath}${BIDI_BASE_PATH}`;
416
+ server.addWebSocketHandler(bidiBasePath, bidiServer);
417
+ server.addWebSocketHandler(`${bidiBasePath}/:sessionId`, bidiServer);
416
418
  } catch (err) {
417
419
  logger.error(
418
420
  `Could not configure Appium server. It's possible that a driver or plugin tried ` +
@@ -438,7 +440,7 @@ async function main(args) {
438
440
  parsedArgs.nodeconfig,
439
441
  parsedArgs.address,
440
442
  parsedArgs.port,
441
- parsedArgs.basePath,
443
+ normalizedBasePath,
442
444
  );
443
445
  }
444
446
  } catch (err) {
@@ -464,7 +466,7 @@ async function main(args) {
464
466
  const protocol = server.isSecure() ? 'https' : 'http';
465
467
  const address = net.isIPv6(parsedArgs.address) ? `[${parsedArgs.address}]` : parsedArgs.address;
466
468
  logServerAddress(
467
- `${protocol}://${address}:${parsedArgs.port}${normalizeBasePath(parsedArgs.basePath)}`,
469
+ `${protocol}://${address}:${parsedArgs.port}${normalizedBasePath}`,
468
470
  );
469
471
 
470
472
  driverConfig.print();
package/lib/utils.js CHANGED
@@ -484,11 +484,6 @@ export function isBroadcastIp(address) {
484
484
  * @typedef {import('@appium/types').ConstraintsToCaps<C>} ConstraintsToCaps
485
485
  */
486
486
 
487
- /**
488
- * @template T
489
- * @typedef {import('type-fest').StringKeyOf<T>} StringKeyOf
490
- */
491
-
492
487
  /**
493
488
  * @typedef {import('@appium/types').Constraints} Constraints
494
489
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "Automation for Apps.",
5
5
  "keywords": [
6
6
  "automation",
@@ -60,32 +60,32 @@
60
60
  "test:unit": "mocha \"./test/unit/**/*.spec.js\""
61
61
  },
62
62
  "dependencies": {
63
- "@appium/base-driver": "^10.0.0",
64
- "@appium/base-plugin": "^3.0.1",
65
- "@appium/docutils": "^2.0.1",
66
- "@appium/logger": "^2.0.0",
63
+ "@appium/base-driver": "^10.1.0",
64
+ "@appium/base-plugin": "^3.0.3",
65
+ "@appium/docutils": "^2.1.1",
66
+ "@appium/logger": "^2.0.2",
67
67
  "@appium/schema": "^1.0.0",
68
- "@appium/support": "^7.0.0",
69
- "@appium/types": "^1.0.0",
68
+ "@appium/support": "^7.0.2",
69
+ "@appium/types": "^1.1.0",
70
70
  "@sidvind/better-ajv-errors": "4.0.0",
71
71
  "ajv": "8.17.1",
72
72
  "ajv-formats": "3.0.1",
73
73
  "argparse": "2.0.1",
74
74
  "async-lock": "1.4.1",
75
75
  "asyncbox": "3.0.0",
76
- "axios": "1.11.0",
76
+ "axios": "1.12.2",
77
77
  "bluebird": "3.7.2",
78
78
  "lilconfig": "3.1.3",
79
79
  "lodash": "4.17.21",
80
- "lru-cache": "11.1.0",
80
+ "lru-cache": "11.2.2",
81
81
  "ora": "5.4.1",
82
82
  "package-changed": "3.0.0",
83
83
  "resolve-from": "5.0.0",
84
- "semver": "7.7.2",
84
+ "semver": "7.7.3",
85
85
  "source-map-support": "0.5.21",
86
- "teen_process": "3.0.0",
87
- "type-fest": "4.41.0",
88
- "winston": "3.17.0",
86
+ "teen_process": "3.0.1",
87
+ "type-fest": "5.0.1",
88
+ "winston": "3.18.3",
89
89
  "wrap-ansi": "7.0.0",
90
90
  "ws": "8.18.3",
91
91
  "yaml": "2.8.1"
@@ -97,5 +97,5 @@
97
97
  "publishConfig": {
98
98
  "access": "public"
99
99
  },
100
- "gitHead": "171c6e6fa3f26832ecbb16f8d58f78e9a972abb9"
100
+ "gitHead": "c00cbfa1fb6d4bd0d8dac00eed02f87587e0eadf"
101
101
  }