Commit Graph

10414 Commits

Author SHA1 Message Date
renovate[bot] fc19705ecd chore(workflows): update actions/checkout digest to 24cb908 2023-03-16 13:12:23 +00:00
Mykola Mokhnach d4654138ee chore(base-driver): Update HTTP caching logic and align it with the standard (#18348) 2023-03-16 07:30:11 +01:00
renovate[bot] 930a45dafe chore(docutils): update dependency mkdocs-material to v9.1.3 2023-03-15 08:39:34 +00:00
renovate[bot] f1a8ce0bba fix(test-support): update dependency sinon to v15.0.2 2023-03-14 10:19:30 -07:00
renovate[bot] 287974a93a chore(deps): update eslint-related packages to v5.55.0 2023-03-14 13:29:43 +00:00
renovate[bot] 4c081c6723 chore(deps): update dependency ws to v8.13.0 2023-03-11 16:32:10 +00:00
renovate[bot] 58ae10f887 chore(deps): update dependency eslint to v8.36.0 2023-03-11 13:01:30 +00:00
renovate[bot] f673efcba5 chore(deps): update dependency lint-staged to v13.2.0 2023-03-10 20:55:04 +00:00
renovate[bot] 503da432dc chore(deps): update dependency lint-staged to v13.1.4 2023-03-10 17:03:49 +00:00
renovate[bot] 4fb7eb8643 chore(deps): update dependency @types/node to v18.15.0 2023-03-10 12:38:39 +00:00
renovate[bot] ae303c73de chore(docutils): update dependency mkdocs-material to v9.1.2 2023-03-10 09:29:53 +00:00
Christopher Hiller ad11fbf97b fix(docutils): inherit stdio in long-running processes
This change ensures when running `mkdocs` or `mike` with the `--serve` flag, the output is unbuffered and stdio is inherited from the parent process.

This will show helpful things like _the URL at which the development server is running_.
2023-03-09 10:12:53 -08:00
Christopher Hiller 9ed6711a7e chore(ci): attempt to build and preview docs
This also isolates the docs build into a workflow that only runs when changes are likely to materially affect doc gen.
2023-03-09 10:11:53 -08:00
Christopher Hiller fa0e853bd0 chore(ci): attempt to avoid running trusted code on PRs from forks 2023-03-08 15:06:19 -08:00
Christopher Hiller 872b924a97 chore: publish
- appium@2.0.0-beta.57
 - @appium/base-driver@9.3.3
 - @appium/base-plugin@2.2.3
 - @appium/doctor@2.0.9
 - @appium/docutils@0.3.0
 - @appium/driver-test-support@0.4.1
 - @appium/eslint-config-appium-ts@0.2.0
 - @appium/eslint-config-appium@8.0.1
 - @appium/execute-driver-plugin@3.0.8
 - @appium/fake-driver@5.2.1
 - @appium/fake-plugin@3.1.7
 - @appium/images-plugin@2.0.8
 - @appium/opencv@2.0.8
 - @appium/plugin-test-support@0.3.9
 - @appium/schema@0.2.6
 - @appium/support@3.1.7
 - @appium/test-support@3.0.9
 - @appium/typedoc-plugin-appium@0.5.1
 - @appium/types@0.10.1
@appium/base-driver@9.3.3 @appium/base-plugin@2.2.3 @appium/doctor@2.0.9 @appium/docutils@0.3.0 @appium/driver-test-support@0.4.1 @appium/eslint-config-appium-ts@0.2.0 @appium/eslint-config-appium@8.0.1 @appium/execute-driver-plugin@3.0.8 @appium/fake-driver@5.2.1 @appium/fake-plugin@3.1.7 @appium/images-plugin@2.0.8 @appium/opencv@2.0.8 @appium/plugin-test-support@0.3.9 @appium/schema@0.2.6 @appium/support@3.1.7 @appium/test-support@3.0.9 @appium/typedoc-plugin-appium@0.5.1 @appium/types@0.10.1 appium@2.0.0-beta.57
2023-03-08 11:43:18 -08:00
Dor Blayzer 0e164ba03d docs: Fix plugins link
fix broken officially-supported plugins link
2023-03-08 11:35:32 -08:00
Christopher Hiller 2359a2ba3b fix(support): remove all logging from env module
Currently there is no way to specify a log level when running extension commands (e.g., `appium driver list`).  Further, the log level used by the support module depends on whether or not Appium set it; used outside of an Appium context, there is no way to programmatically set the log level of the support module via an external API.
To that end, I just removed the log messages, because a "proper" fix will be quite involved.  See #16970.
2023-03-08 11:34:31 -08:00
renovate[bot] 49694f50a4 fix(execute-driver-plugin): update dependency webdriverio to v7.30.2 2023-03-08 11:05:39 +00:00
renovate[bot] a2cfb832ad chore(deps): update dependency json-schema-to-typescript to v12 2023-03-07 14:27:47 -08:00
Christopher Hiller 4cfad004db feat(docutils): add --upgrade flag to init
users can run `appium-docs init --upgrade` to upgrade python deps (e.g., mkdocs, mkdocs-material)
2023-03-07 14:27:16 -08:00
Christopher Hiller b159780fd6 chore(docutils): fix start script 2023-03-07 14:27:16 -08:00
renovate[bot] e2f7dd7154 chore(deps): update dependency eslint-config-prettier to v8.7.0 2023-03-07 10:55:56 +00:00
Christopher Hiller e9dae3f6d0 fix(appium,fake-driver): expose child process when running an extension script
This change makes it so when running an extension script (e.g., `appium driver foo run some-script`), unless the `--json` flag is present, the child process will do no buffering whatsoever and will inherit `process.stdin`, `process.stdout` and `process.stderr` from Appium.

This means that extension scripts can do stuff like prompt the user for input.  It _also_ means they can do stuff like display progress bars and spinners.

If the user wants JSON data, we revert to the old behavior, which is to buffer the output and dump it once the script has completed.
2023-03-06 15:46:50 -08:00
Christopher Hiller 58b4790b1d chore: lint all the typescript 2023-03-06 15:21:58 -08:00
Christopher Hiller 63eddb670f docs(eslint-config-appium): update some stuff in README.md 2023-03-06 15:21:58 -08:00
Christopher Hiller b7d86c0d04 chore(eslint-config-appium): fix broken keywords 2023-03-06 15:21:58 -08:00
Christopher Hiller dfe02ca98c feat(eslint-config-appium-ts): create new pkg @appium/eslint-config-appium-ts
This adds a new package which consumers having TS sources can use.  This does not affect current users of `@appium/eslint-config-appium`.

Due to the nature of TS, it can be a little more bold with fixes (e.g., changing let to const). I changed the following rules from the recommended settings:

no-empty-function: Reduced to a warning. It's likely we want the functions, but perhaps they should not be empty.
no-empty-interface: Disabled; we use these to merge mixin interfaces with driver classes.
no-explicit-any: Disabled; while transitioning from an untyped codebase to a typed one, we still need to use any in places. Eventually these should all be replaced.
no-non-null-assertion: Disabled; This allows us to continue use of the ! operator, which is handy when working with untyped or loosely-typed code (especially in tests).
no-var-requires: Reduced to a warning. Occasionally we may need to use require() instead of import.
Since the configuration extends our shared config, the following rules have been disabled:

import/no-unresolved: The eslint-plugin-import module cannot resolve TS modules.
no-unused-vars: This rule conflicts with typescript-eslint's rule, so it must be disabled per the documentation.
promise/no-native: In our TS-based packages, I haven't needed Bluebird, so it doesn't make sense to require it.
require-await: TS is much more aware of the return values of functions; this is not needed to avoid ambiguity (in TS code).
2023-03-06 15:21:58 -08:00
renovate[bot] 10e6815a39 chore(docutils): update dependency mkdocs-material to v9.1.1 2023-03-06 14:01:53 -08:00
Christopher Hiller cd76622aa9 fix(typedoc-plugin-appium): replace void responses with 'null'
The main thrust of this was to resolve #18269.

Implementation-wise, we have to modify an `IntrinsicType` of which both `void` and `undefined` become.  To make it `null`, we must create a new `LiteralType` (`null` is not an "intrinsic" type; I don't know why).  I would think that TypeDoc wouldn't go around creating new `LiteralType`s every time it sees `null`, but I don't see it doing anything else. Anyway, if there is a "type cache" somewhere, I'm not sure how to get at it.

Additionally, the new reflections created for parameters and the call signature were not being "registered" properly with TypeDoc.  So this adds a `static create` to both `CommandData` and `ExecMethodData` which wraps the constructor for each, respectively, then performs the registration.  This keeps a `Context` object _out_ of `CommandData`/`ExecMethodData` instances (it would only be used once at time of instantiation anyway).

Un-memoized a couple methods in `BaseCommandData` since not necessary
2023-03-06 13:18:23 -08:00
Christopher Hiller 296cb2436c chore: add auto-labeler workflow
This will automatically label PRs. We can update it to further automatically label issues at a later time, if necessary.

I have added labels for each package.
2023-03-06 13:12:32 -08:00
renovate[bot] 01bff49297 fix(images-plugin): update dependency lru-cache to v7.18.3 2023-03-06 13:34:00 +00:00
renovate[bot] 48c331157f fix(images-plugin): update dependency lru-cache to v7.18.2 2023-03-05 12:47:18 +00:00
Kazuaki Matsuo 9f8daf385b docs(appium): update migration guide in Japanese (#18297)
* docs(appium): update migration gude in js

* Update migrating-1-to-2.md
2023-03-05 17:00:32 +09:00
renovate[bot] 7bae977ca9 chore(deps): update dependency @types/node to v18.14.6 2023-03-04 12:04:54 +00:00
renovate[bot] 4ed745a95f fix(docutils): update dependency lilconfig to v2.1.0 2023-03-04 06:38:14 +00:00
renovate[bot] 85e4bd8925 fix(support): update dependency pngjs to v7 2023-03-03 11:38:15 -08:00
Christopher Hiller cce27fcf88 chore(docutils): review updates
- Use `util.pluralize()` from `@appium/support` instead of `pluralize` directly
- Write some more docstrings
2023-03-03 11:36:00 -08:00
Christopher Hiller b30b2cfb84 feat(docutils): better path validation
This adds up-front checking of user-provided custom paths to avoid doing a bunch of work and then failing later ("fail fast")
2023-03-03 11:36:00 -08:00
Christopher Hiller 9ccbab5dc0 fix(appium,support): fs.readPackageJsonFrom() returns proper type
This function always returns a `NormalizedPackageJson`, so let's be explicit about that.
2023-03-03 11:36:00 -08:00
Christopher Hiller 760bb5b8f3 chore(appium): skip auto-install of extensions if monorepo detected 2023-03-03 10:51:52 -08:00
renovate[bot] cb14faae33 chore(deps): update dependency @types/node to v18.14.5 2023-03-03 12:08:20 +00:00
Mykola Mokhnach 2a6a13ac89 fix(support): Improve error description on image load (#18284)
Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2023-03-03 06:06:52 +01:00
Christopher Hiller 4b43af0709 chore: fix dupe in clean script 2023-03-02 15:49:33 -08:00
Christopher Hiller 504415d0cd chore: build must pass on local npm install 2023-03-02 15:49:33 -08:00
Christopher Hiller 75defa7b48 chore: add prepack script
sometimes (when?) the smoke tests can pack the workspaces before they have actually been built, which will of course cause an error. this adds a prepack script to avoid the problem

removes pack-all script, which I added for reasons
2023-03-02 15:49:33 -08:00
Christopher Hiller be86627595 fix(base-driver): use new mixin strategy
also fix a broken type in fake-driver
2023-03-02 15:47:24 -08:00
Christopher Hiller 080eb8aa1b chore(opencv): increase timeout for unit test
this can take awhile when exercising many cores
2023-03-02 15:01:13 -08:00
Christopher Hiller 1b70551055 fix(base-driver): remove needless static prop breaking the build 2023-03-02 15:01:13 -08:00
Christopher Hiller d262271b26 chore(appium): InnerDriver is actually an ExternalDriver
While `findMatchingDriver()` returns a `MatchedDriver`--which is a wrapper around `DriverClass`--the instance of `DriverClass`' constructor is a `Driver`.  But in the case of `AppiumDriver`, we know `InnerDriver` is actually an `ExternalDriver`; this is why we can assign to `server`, `serverHost`, etc.
2023-03-02 15:01:13 -08:00
Christopher Hiller 45b026de67 chore(base-plugin): better type handling in executeMethod 2023-03-02 15:01:13 -08:00