This PR adds the `appiumDeprecated` keyword which can be used to mark an argument as deprecated in the `--help` text.
In addition:
- fix a bug where `--help` would cause Appium to exit with a nonzero exit code (it would essentially `throw undefined`)
- remove unused `lib/cli/argparse-actions` and stuff that used it, since that stuff was also unused
- implement `appiumCliIgnore`, though it's not actually being used atm.
- extract helpers for running `appium` into `test/cli/cli-helpers.js`
BREAKING CHANGE:
ESLint expects configs or plugins which require other configs or plugins to have _peer dependencies_ of those things _and_ of ESLint itself. All deps have been changed to peer deps, and this module now requires the installation of the following _if_ using npm older than v7:
```
"@babel/core": "7.16.0",
"@babel/eslint-parser": "7.16.3",
"eslint": "7.32.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-mocha": "9.0.0",
"eslint-plugin-promise": "5.1.1"
```
npm@7 will install these automatically if they do not exist.
BREAKING CHANGE:
Package-root `.js` files (typically `index.js`) are now (typically) cjs wrappers. These files needn't be transpiled, and in fact, doing so will create an invalid module because it will attempt to reference `build/whatever` but the resulting artifact would live in `build/index.js`. `build/index.js` will no longer exist.
This should (hopefully) fix the Lerna issues we've been encountering. With this change, the root monorepo lists all packages as dependencies and uses relative `file:` URLs to do so. This means `lerna bootstrap` is no longer necessary.
In addition, defaults to `--save-exact` in `npm install` and `lerna add`. Also installs peer dependencies of `@appium/eslint-config-appium`.
I had intended to allow extensions to define a schema via `package.json` instead of a path to a file, and apparently forgot to implement this. So, now it is implemented.
Logging was happening here before the logger was properly initialized, which looked weird. Just remove logs for now until we find a better solution.
In addition, fixed some typing problems:
- we need `@types/node` for node globals (like errors that have a `code` property)
- set various typings as globals: `node`, `mocha`, `chai` & its ilk