Commit Graph

10333 Commits

Author SHA1 Message Date
renovate[bot] 1ea309814a chore(docutils): update dependency mkdocs-material to v9.1.5 2023-03-31 11:52:55 +00:00
Christopher Hiller 19ff931bc0 chore(typedoc-plugin-appium): normalize some conversion log messages
These now contain more info about what exactly is being converted.
2023-03-30 16:58:36 -07:00
Christopher Hiller 9d2469fdf3 docs: enable typedoc generation for more workspaces
- Doc gen for:
    - `@appium/driver-test-support`
    - `@appium/opencv`
    - `@appium/plugin-test-support`
    - `@appium/test-support`

- Added a `dev:docs` script in the root monorepo. The file watcher does _not_ presently rebuild reference docs upon changes to sources (which is a limitation of `@appium/docutils`).
- Changed the `dev:docs:*` scripts in `appium` to use `appium-docs` (so it rebuilds reference docs at least once [because it runs typedoc!!])
2023-03-30 16:58:36 -07:00
Christopher Hiller 47a4ddd2a3 chore(types): deprecate Element.ELEMENT
- move `Element` into `util` since it isn't specific to action sequences
- add more docs for it
2023-03-30 16:57:41 -07:00
Christopher Hiller a1723231be chore: update labeler config
- automatically dump tooling config into "chore"
- add missing `@appium/eslint-config-appium-ts` label
2023-03-30 11:17:06 -07:00
Christopher Hiller f4a254f204 chore: rename workflow labeler.yml to auto-labeler.yml
This avoids using the same filename as the [multi-labeler action](/fuxingloh/multi-labeler)'s config file, just for clarity sake.
2023-03-30 11:17:06 -07:00
Christopher Hiller 22b943dff1 chore: attempt to get labeler workflows running against forks 2023-03-30 11:17:06 -07:00
renovate[bot] 19eaaf5764 chore(deps): update dependency eslint to v8.37.0 2023-03-30 12:29:01 +00:00
renovate[bot] 55805390b5 fix(types): update dependency type-fest to v3.7.2 2023-03-30 10:07:01 +00:00
renovate[bot] e94275c229 chore(deps): update dependency eslint-import-resolver-typescript to v3.5.4 2023-03-30 09:19:51 +00:00
renovate[bot] f795fe6056 chore(deps): update dependency @types/node to v18.15.11 2023-03-30 06:09:41 +00:00
renovate[bot] bbcaec9c05 fix(appium): update dependency package-changed to v3 2023-03-29 16:04:55 -07:00
Christopher Hiller 43a0d1778f chore: fix fossa.yml
the schema is invalid!
2023-03-29 15:48:56 -07:00
Christopher Hiller d514ebdd7e chore: update gitHead for lerna screuwp 2023-03-28 13:12:00 -07:00
Christopher Hiller 8480a85ce2 chore: publish
- appium@2.0.0-beta.58
 - @appium/base-driver@9.3.4
 - @appium/base-plugin@2.2.4
 - @appium/doctor@2.0.10
 - @appium/docutils@0.3.1
 - @appium/driver-test-support@0.4.2
 - @appium/eslint-config-appium-ts@0.3.0
 - @appium/eslint-config-appium@8.0.2
 - @appium/execute-driver-plugin@3.0.9
 - @appium/fake-driver@5.2.2
 - @appium/fake-plugin@3.1.8
 - @appium/plugin-test-support@0.3.10
 - @appium/support@3.1.8
 - @appium/test-support@3.0.10
 - @appium/typedoc-plugin-appium@0.5.2
 - @appium/types@0.10.2
 - @appium/universal-xml-plugin@1.0.7
@appium/base-driver@9.3.4 @appium/base-plugin@2.2.4 @appium/doctor@2.0.10 @appium/docutils@0.3.1 @appium/driver-test-support@0.4.2 @appium/eslint-config-appium-ts@0.3.0 @appium/eslint-config-appium@8.0.2 @appium/execute-driver-plugin@3.0.9 @appium/fake-driver@5.2.2 @appium/fake-plugin@3.1.8 @appium/plugin-test-support@0.3.10 @appium/support@3.1.8 @appium/test-support@3.0.10 @appium/typedoc-plugin-appium@0.5.2 @appium/types@0.10.2 @appium/universal-xml-plugin@1.0.7 appium@2.0.0-beta.58
2023-03-28 13:10:45 -07:00
renovate[bot] ad98d38efb chore(deps): update eslint-related packages to v5.57.0 2023-03-28 19:38:54 +00:00
renovate[bot] 1358425e1a chore(deps): update dependency @commitlint/cli to v17.5.1 2023-03-28 12:50:54 +00:00
renovate[bot] 43fa0d7425 chore(deps): update dependency tsd to v0.28.1 2023-03-28 10:22:58 +00:00
renovate[bot] 86eb495641 fix(driver-test-support): update definitelytyped 2023-03-28 08:00:49 +00:00
Christopher Hiller 5485f0b9cd fix(types): fix method map types
These types do not care about constraints, only the shape of the driver itself.
2023-03-27 17:07:51 -07:00
Christopher Hiller 4974403661 fix: backwards-compatible fixes for TS v5.x
These will be issues when we upgrade
2023-03-27 17:07:51 -07:00
Christopher Hiller deb631b456 fix(basedriver): convert main driver implementation to typescript
This seems to fix the bug in #18379.  There must be some sort of bug in TypeScript w/r/t `@implements` or maybe even it was not treating `@typedef` as a proper alias.  Perhaps it's user error--omitting optional type args in alias-style typedefs may end up making a new type entirely.  idk, but this was easier to deal with.

Closes #18379.
2023-03-27 17:07:51 -07:00
Christopher Hiller 238c489f3a chore(base-driver): add a failing type test 2023-03-27 17:07:51 -07:00
Christopher Hiller 3c9fa7ba73 fix(appium,types,base-driver,fake-driver,driver-test-support): normalize constraint defaults
Another handful of fixes.

- remove second "extra" parameter from `Capabilities`, `NSCapabilities` `W3CCapabilities`. we were not using it anywhere to my knowledge. it was an escape hatch anyway.
- never assign `BaseDriverCapConstraints` as the default constraints, because this is confusing as hell. instead, drivers should use the `*DriverCaps` types which automatically pulls the base constraints in. applied across several workspaces
- renamed `DeviceSettings` => `IDeviceSettings` because `DeviceSettings` is a class.
- the session ID param of `Core`'s `sessionExists()` is actually optional (per the implementation)
- allow some modicum of type narrowing at the class level around settings and values returned by `ISessionHandler`'s methods. also, not all values in the raw settings object are of the same type `T`, so fix that
- `server`, `serverHost`, `serverPort` and `serverPath` are not members of `Core` (using `AppiumDriver` as a litmus test--it interacts with `Driver` types but does not have these properties itself)
- changed a few types to interfaces where possible
- moved a lost comment
- further dumbed-down the logdef stuff
- `Driver.driverData` is _always_ defined, since `Core` makes it an empty array.
- `DriverOpts` no longer contains "partial" caps; this it not quite right as the caps are not assigned until a session is created, but there's a conflict between some props which are _both_ server args and defined in constraints.  anyway, this is what `initialOpts` is for
- fix some type disagreements in basedriver's "capabilities" module
2023-03-27 17:07:51 -07:00
Christopher Hiller e8e8252c52 chore(types): add type tests for Plugins 2023-03-27 14:23:25 -07:00
Christopher Hiller 50f1e69268 fixup 2023-03-27 14:23:25 -07:00
Christopher Hiller 0dcd5fa371 fix(base-driver,base-plugin,types): update PluginCommand and DriverCommand types
The first arg of `PluginCommand` is a `NextPluginCallback` which now returns `Promise<unknown>` instead of `Promise<void>`, which was incorrect.

We use `unknown` rather than `any` because it forces us to be explicit about the return value of `await next()` if we are to call it.

Added a type `DriverCommandToPluginCommand` which essentially converts a `DriverCommand` to a `PluginCommand`.  It's probably best used as a type guard or decorator, but it can "fill in the blanks" when overloading commands in a plugin.

Also normalized some of the `TArgs`/`TReturn` stuff.
2023-03-27 14:23:25 -07:00
Christopher Hiller 75cbb11d00 chore: rename ExtensionCommand classes due to naming conflict
mainly because a "command" is a thing in drivers/plugins, and these classes refer to something else completely unrelated.  renamed to `*CliCommand` to avoid confusion.
2023-03-27 14:23:25 -07:00
Christopher Hiller 020473afc4 fix(eslint-config-appium): disable import/no-unresolved for tsd tests
`tsd` has a apparently non-standard resolution algorithm
2023-03-27 12:44:47 -07:00
Christopher Hiller 497641a00d chore: add tsd for testing types
This adds [tsd](https://npm.im/tsd) which provides a small framework around running expectations against declaration files.  This is intended to be run against hand-written declarations, but because we (apparently) cannot rely on `tsc` to output valid declaration files, we should also use it to test the generated declarations of our packages.
2023-03-27 12:44:47 -07:00
renovate[bot] bc860c733a fix(types): update dependency type-fest to v3.7.1 2023-03-27 08:31:03 +00:00
renovate[bot] d774a8428a fix(test-support): update dependency sinon to v15.0.3 2023-03-27 07:22:50 +00:00
renovate[bot] a593269f61 chore(deps): update dependency @types/node to v18.15.10 2023-03-26 08:57:05 +00:00
renovate[bot] 89fd52a602 chore(deps): update dependency @types/node to v18.15.9 2023-03-25 15:57:36 +00:00
renovate[bot] 7f061d2362 chore(docutils): update dependency mkdocs-material to v9.1.4 2023-03-25 11:08:46 +00:00
renovate[bot] 2c1e1532ad chore(deps): update dependency lerna to v6.6.1 2023-03-25 08:02:49 +00:00
Christopher Hiller 0c52b50e65 fix(appium): remove longjohn
This removes `longjohn` and replaces it with a statement which increases the stack trace limit from the default (10) to 100.

I believe setting this overrides whatever was passed to the runtime `--stack-trace-limit` option.  If someone complains, we can try a different strategy.

Closes #18357
2023-03-24 12:22:33 -07:00
renovate[bot] 6db70f4143 chore(deps): update dependency lerna to v6.6.0 2023-03-24 14:27:16 +00:00
renovate[bot] 1800530bf2 chore(deps): update definitelytyped 2023-03-24 12:45:03 +00:00
renovate[bot] 32a5ee91df chore(deps): update dependency prettier to v2.8.7 2023-03-24 10:53:51 +00:00
renovate[bot] 5c0315d3bb chore(workflows): update actions/checkout digest to 8f4b7f8 2023-03-24 08:40:56 +00:00
Erhan Alankuş 12f4ec404c docs(appium): grammar fix (#18359)
Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2023-03-23 23:21:19 -07:00
Erhan Alankuş 8aa39c117f docs(appium): update index.md (#18363)
Co-authored-by: Kazuaki Matsuo <fly.49.89.over@gmail.com>
2023-03-23 23:20:46 -07:00
Christopher Hiller 017216533b chore(ci): suppress warnings when linting
This suppresses all warnings when running ESLint in CI (since they are noisy)
2023-03-23 13:05:31 -07:00
Christopher Hiller 499bda4533 chore(types): make the lone JS file a TS file
also: remove unused imports
2023-03-23 12:15:51 -07:00
Christopher Hiller 9ef564f0be chore(types): move more utility types into util module 2023-03-23 12:15:51 -07:00
Christopher Hiller d303527c3d fix(base-driver): misc type fixes
- `PostProcessOptions` moved into `@appium/types`
- `shutdownUnexpectedly` cannot be marked `@protected` as anything used this way is inaccessible in mixins
- suppress a `@typescript-eslint` warning. this probably needs to happen in a few other files
2023-03-23 12:15:51 -07:00
Christopher Hiller 51a8f2fc34 fix(base-driver): fix timeout mixin to use proper context types 2023-03-23 12:15:51 -07:00
Christopher Hiller c56dc98d13 chore(base-driver): fix description of mixin function to refer to BaseDriver 2023-03-23 12:15:51 -07:00
Christopher Hiller 454f6a5d63 fix(support): fix a few type problems; use new HTTPHeaders type 2023-03-23 12:15:51 -07:00