Commit Graph

8881 Commits

Author SHA1 Message Date
Jonathan Lipps 62b97417fc Publish
- appium@2.0.0-beta.37
 - @appium/base-driver@8.5.5
 - @appium/base-plugin@1.9.1
 - @appium/doctor@1.16.21
 - @appium/docutils@0.0.6
 - @appium/eslint-config-appium@6.0.2
 - @appium/execute-driver-plugin@2.0.1
 - @appium/fake-driver@4.0.1
 - @appium/fake-plugin@2.0.1
 - @appium/gulp-plugins@7.0.2
 - @appium/images-plugin@1.3.1
 - @appium/opencv@1.0.9
 - @appium/relaxed-caps-plugin@1.0.0-beta.8
 - @appium/schema@0.0.7
 - @appium/support@2.59.1
 - @appium/test-support@1.3.21
 - @appium/types@0.2.5
 - @appium/universal-xml-plugin@1.0.0-beta.10
@appium/base-driver@8.5.5 @appium/base-plugin@1.9.1 @appium/doctor@1.16.21 @appium/docutils@0.0.6 @appium/eslint-config-appium@6.0.2 @appium/execute-driver-plugin@2.0.1 @appium/fake-driver@4.0.1 @appium/fake-plugin@2.0.1 @appium/gulp-plugins@7.0.2 @appium/images-plugin@1.3.1 @appium/opencv@1.0.9 @appium/relaxed-caps-plugin@1.0.0-beta.8 @appium/schema@0.0.7 @appium/support@2.59.1 @appium/test-support@1.3.21 @appium/types@0.2.5 @appium/universal-xml-plugin@1.0.0-beta.10 appium@2.0.0-beta.37
2022-05-31 16:52:23 -07:00
Jonathan Lipps f6cbfd77eb chore: publish, also set an explicit version for images since it was way off 2022-05-31 16:51:36 -07:00
Jonathan Lipps 5c7af8ee73 Publish
- appium@2.0.0-beta.36
 - @appium/base-driver@8.5.4
 - @appium/base-plugin@1.9.0
 - @appium/doctor@1.16.20
 - @appium/docutils@0.0.5
 - @appium/eslint-config-appium@6.0.1
 - @appium/execute-driver-plugin@2.0.0
 - @appium/fake-driver@4.0.0
 - @appium/fake-plugin@2.0.0
 - @appium/gulp-plugins@7.0.1
 - @appium/images-plugin@1.2.0
 - @appium/opencv@1.0.8
 - @appium/relaxed-caps-plugin@1.0.0-beta.7
 - @appium/schema@0.0.6
 - @appium/support@2.59.0
 - @appium/test-support@1.3.20
 - @appium/types@0.2.4
 - @appium/universal-xml-plugin@1.0.0-beta.9
@appium/base-driver@8.5.4 @appium/base-plugin@1.9.0 @appium/doctor@1.16.20 @appium/docutils@0.0.5 @appium/eslint-config-appium@6.0.1 @appium/execute-driver-plugin@2.0.0 @appium/fake-driver@4.0.0 @appium/fake-plugin@2.0.0 @appium/gulp-plugins@7.0.1 @appium/images-plugin@1.2.0 @appium/opencv@1.0.8 @appium/relaxed-caps-plugin@1.0.0-beta.7 @appium/schema@0.0.6 @appium/support@2.59.0 @appium/test-support@1.3.20 @appium/types@0.2.4 @appium/universal-xml-plugin@1.0.0-beta.9 appium@2.0.0-beta.36
2022-05-31 16:44:51 -07:00
Christopher Hiller ac8e0e0451 chore(appium,base-driver,base-plugin,doctor,docutils,eslint-config-appium,execute-driver-plugin,fake-driver,fake-plugin,gulp-plugins,images-plugin,opencv,relaxed-caps-plugin,schema,support,test-support,types,universal-xml-plugin): fix engines field 😂 2022-05-31 16:26:43 -07:00
Renovate Bot f5a2b601ff chore(appium): update dependency yaml to v2.1.1 2022-05-31 15:42:56 +00:00
Renovate Bot 8feb8bb442 chore(): update dependency lint-staged to v12.4.3 2022-05-31 12:46:39 +00:00
Renovate Bot 8e3137c050 chore(gulp-plugins): update dependency replace-in-file to v6.3.5 2022-05-30 12:09:30 +00:00
Renovate Bot f03b404a9a chore(gulp-plugins): update dependency replace-in-file to v6.3.3 2022-05-27 14:43:04 +00:00
Renovate Bot 9f0b2364e4 chore(doctor): update dependency appium-adb to v9.6.1 2022-05-27 13:07:35 +00:00
Renovate Bot 81ff2a3082 chore(): update dependency ws to v8.7.0 2022-05-27 11:08:45 +00:00
Renovate Bot e5e8f9b874 chore(test-support): update dependency @babel/runtime to v7.18.3 2022-05-26 15:29:43 -07:00
Renovate Bot a33416dd52 chore(): update dependency typescript to v4.7.2 2022-05-26 15:29:12 -07:00
Christopher Hiller 681f54e847 chore(appium): better error handling during extension loading
Currently, failing to `require()` an extension and access its "main class" can result in a rather cryptic `TypeError`.

This adds two specific errors when:

- The path to the extension cannot be found.  This could happen if someone, say, deletes the extension using `rm -rf`, but leaves `extensions.yaml` intact.
- The extension can be found, but its main class cannot be found.  This would be due to an invalid extension and is generally not "user error"

Added some tests for it.
2022-05-26 15:21:41 -07:00
Christopher Hiller d09c915dad fix(relaxed-caps-plugin): export RelaxedCapsPlugin class
extensions _may_ use default exports, but they _must_ use named exports.

Closes #16981
2022-05-26 15:21:41 -07:00
Christopher Hiller 91962384c9 feat(universal-xml-plugin): use peer deps
BREAKING CHANGE:

`@appium/universal-xml-plugin` now expects to be installed alongside `appium`.

# Conflicts:
#	packages/universal-xml-plugin/lib/logger.js
#	packages/universal-xml-plugin/lib/plugin.js
#	packages/universal-xml-plugin/test/unit/plugin.spec.js

# Conflicts:
#	packages/universal-xml-plugin/test/unit/plugin.spec.js
2022-05-26 12:07:17 -07:00
Christopher Hiller d06ceb5472 feat(images-plugin): use peer deps 2022-05-26 12:07:17 -07:00
Christopher Hiller a98e0e8201 feat(relaxed-caps-plugin): use peer deps
BREAKING CHANGE:

`@appium/relaxed-caps-plugin` now expects to be installed alongside `appium`.
2022-05-26 12:07:17 -07:00
Christopher Hiller aabe804d7e feat(execute-driver-plugin): use peer deps
BREAKING CHANGE:

`@appium/execute-driver-plugin` now expects to be installed alongside `appium`.

# Conflicts:
#	packages/execute-driver-plugin/lib/execute-child.js
#	packages/execute-driver-plugin/lib/plugin.js
#	packages/execute-driver-plugin/test/e2e/plugin.e2e.spec.js

# Conflicts:
#	packages/execute-driver-plugin/test/e2e/plugin.e2e.spec.js
2022-05-26 12:07:17 -07:00
Christopher Hiller a0edfca8ef chore(appium,fake-driver,fake-plugin): hardcode peer dep version
Lerna won't manage this for us.  Further, `peerDependencies` should be as broad as possible.  We can narrow this range later, if necessary.  Narrowing the range will be a breaking change in the plugin.
2022-05-26 12:07:17 -07:00
Christopher Hiller eb460b915a feat(fake-plugin): use peer deps
BREAKING CHANGE:

This now requires a peer dependency on `appium`
2022-05-26 12:07:17 -07:00
Christopher Hiller 189e85fc0b feat(fake-driver): use peer deps
BREAKING CHANGE:

This now requires a peer dependency on `appium`
2022-05-26 12:07:17 -07:00
Christopher Hiller 6b224f545f feat(appium,support): extension check improvements
This PR changes a few things:

- Extension problems are now displayed correctly at `appium server` startup.  This was done by changing the default `npmlog` level, then reesetting it to `silent` when `winston` takes over (in `logsink.init()`)
- Extension problems are also displayed at install time.
- Improved performance of `appium <driver|plugin> install` in many cases by actually checking if the thing is installed _before_ installing it.
- `ExtensionCommand` uses a new console logging mechanism (`console` in `@appium/support`) tailored to CLI usage, since it is intended to be run via the CLI.  Using this, we handle the result of extension checks both at server runtime and during CLI tool usage in the appropriate manner.  The implementation is just a dumb wrapper around `console.log` and should eventually be removed when we revisit the logging architecture.
- Separated extension checks further into "errors" ("Problems") and "warnings".  As these demand distinct log levels, `ExtensionConfig` no longer accepts a `logFn` in its constructor (since this restricted to a single level ("error"))
- Generally improved specificity, helpfulness, and reduced extraneous verbosity (like this sentence) of warnings
- Removed `strip-colors`, as this functionality is present in `@colors/colors`.  The E2E test helper now automatically strips colors from child processes.
- More tests
- Change `e2e-helpers` to use `CliConsole` for command logging output during tests
- Change the "uninstall" command to use `npm uninstall`, since `rm -rf` will hose `node_modules` if the current project has a dependency on `appium` (in other words, if they are otherwise using a package manager to manage extensions).  This is slower but safer.
2022-05-26 12:07:17 -07:00
Renovate Bot 3316ba65ef chore(): update dependency type-fest to v2.13.0 2022-05-25 20:37:45 +00:00
Renovate Bot c5a51c24b2 chore(gulp-plugins): update dependency del to v6.1.1 2022-05-25 17:22:23 +00:00
Renovate Bot 4d6c114fe8 chore(gulp-plugins): update babel monorepo to v7.18.2 2022-05-25 14:28:48 +00:00
Renovate Bot cf7a133cc6 chore(): update dependency lint-staged to v12.4.2 2022-05-25 11:57:29 +00:00
Renovate Bot 75da9aa6a2 chore(doctor): update dependency appium-adb to v9.6.0 2022-05-22 12:48:01 +00:00
Renovate Bot 92b17d6c2e chore(gulp-plugins): update babel monorepo to v7.18.0 2022-05-20 14:59:10 -07:00
Christopher Hiller b1b363f09f test(appium): increase e2e test timeout 2022-05-20 14:08:52 -07:00
Christopher Hiller e0f14b5931 chore(appium,base-plugin,types): cli args changes for plugins
This changes how plugins handle CLI args:

- The `cliArgs` instance prop of a `Plugin` will never be `undefined`. If there are no args, the prop will be an empty object.
- The `cliArgs` instance prop of a `Plugin` will now contain default values, if any were provided by the `Plugin`'s schema.

This differs from how the same property is handled in drivers.  To that end, I split `AppiumDriver#getCliArgsForExtension()` (previously `assignCliArgsToExtension()`) into two separate methods for clarity.

This change also contains a few associated improvements to tests and types.
2022-05-20 14:08:52 -07:00
Christopher Hiller 55504514a9 chore(fake-plugin): remove now-invalid constructor 2022-05-20 14:08:52 -07:00
Christopher Hiller f4c0b5b9b4 chore(appium,base-plugin,types): plugin name is derived from manifest
This PR changes the shape of plugin classes as well as how CLI args get assigned.

- The `pluginName` static property has been removed.  `name` is now assigned via the `BasePlugin` constructor, and is derived from the plugin name in the manifest.  This means that an implementor only needs to provide a `pluginName` in the manifest, and the data is not duplicated.  The value in this map (the plugin name) is used to instantiate the plugin, instead of passing static `pluginName` property into the constructor.
- CLI args are now passed in through the constructor instead of assigned to the plugin instance after the fact.

Implementation details:

`getActivePlugins()` and `getActiveDrivers()` now return a `Map` of an extension _class_ to an extension name.  The key is _not_ an instance, and is effectively a singleton, so we are not at risk of a memory leak.

This change does not otherwise affect drivers.
2022-05-20 14:08:52 -07:00
neilnaveen 7e2412499a chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-05-18 11:58:51 -07:00
Renovate Bot c0f71ef3ff chore(doctor): update dependency appium-adb to v9.5.0 2022-05-18 13:44:07 +00:00
Renovate Bot 45285429d6 chore(gulp-plugins): update babel monorepo to v7.17.12 2022-05-17 21:31:08 +00:00
Renovate Bot db2a4fe60b chore(): update dependency @types/node to v16.11.36 2022-05-17 11:21:50 +00:00
Renovate Bot 48b465f0fe chore(gulp-plugins): update dependency del to v6.1.0 2022-05-16 11:54:26 -07:00
Renovate Bot 11975dafd9 chore(appium): update dependency yaml to v2.1.0 2022-05-16 11:54:08 -07:00
Renovate Bot cffaa2dcc9 chore(images-plugin): update dependency lru-cache to v7.10.1 2022-05-16 11:53:54 -07:00
Renovate Bot 8c956e9f09 chore(gulp-plugins): update dependency yargs to v17.5.1 2022-05-16 11:53:37 -07:00
Renovate Bot 5a149d35fc chore(support): update dependency glob to v8.0.3 2022-05-16 11:53:12 -07:00
Renovate Bot b359f29df5 chore(): update dependency @types/node to v16.11.35 2022-05-13 13:02:20 +00:00
Christopher Hiller 5f28ce81df chore(appium): renamed postinstall.js to autoinstall-extensions.js
...just so we're clear about what it does.  Added some more explanation
in docstrings.
2022-05-12 14:47:51 -07:00
Christopher Hiller 936427f1d1 test(appium): bump exec time of cli e2e tests to avoid flake 2022-05-12 14:47:51 -07:00
Christopher Hiller 3e2c05d8a2 fix(appium): fix extension autoinstall postinstall script
Resolves #16924

Because the `postinstall` script of `appium` needs functions in `@appium/support`, that module must be compiled _before_ its `postinstall` script runs.  Prior to this PR, only the monorepo root would run a `postinstall` script to build the subpackages.  Now, each package has a `prepare` script which runs its own build; this happens prior to any `postinstall`.  This way, the `postinstall` script in `appium` can run successfully.
2022-05-12 14:47:51 -07:00
Christopher Hiller 9f551e274f chore(gulp-plugins): remove unneeded dependencies
These two deps are devDependencies of the monorepo root.  Since we do not use TS in any "production" capacity, typings should not be production dependencies anyway.
2022-05-12 14:07:18 -07:00
Christopher Hiller 147d1d1d34 test(images-plugin): avoid call to deprecated reset() method 2022-05-12 14:07:07 -07:00
Christopher Hiller 2289b45272 fix(types,base-plugin): fix static prop types for plugins
This change modifies the type of `BasePlugin.newMethodMap`, adds a
parameter to the `MethodMap` type, and updates the base plugin TS
config for better incremental builds.
2022-05-12 14:06:55 -07:00
Christopher Hiller 59b885aa66 chore(base-driver): guard against null sessions if proxy used weirdly 2022-05-12 12:32:57 -07:00
Christopher Hiller d5ca3007b3 chore(types): restore example comment for newMethodMap in PluginStatic 2022-05-12 12:32:57 -07:00