Commit Graph

311 Commits

Author SHA1 Message Date
Christopher Hiller a11a6ede33 chore: publish
- appium@2.0.0-beta.59
 - @appium/base-driver@9.3.5
 - @appium/base-plugin@2.2.5
 - @appium/doctor@2.0.11
 - @appium/docutils@0.3.2
 - @appium/driver-test-support@0.4.3
 - @appium/eslint-config-appium-ts@0.3.1
 - @appium/eslint-config-appium@8.0.3
 - @appium/execute-driver-plugin@3.0.10
 - @appium/fake-driver@5.2.3
 - @appium/fake-plugin@3.1.9
 - @appium/images-plugin@2.0.9
 - @appium/opencv@2.0.9
 - @appium/plugin-test-support@0.3.11
 - @appium/support@3.1.9
 - @appium/test-support@3.0.11
 - @appium/typedoc-plugin-appium@0.5.3
 - @appium/types@0.10.3
 - @appium/universal-xml-plugin@1.0.8
2023-04-03 12:55:58 -07:00
renovate[bot] 55805390b5 fix(types): update dependency type-fest to v3.7.2 2023-03-30 10:07:01 +00: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
2023-03-28 13:10:45 -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 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
renovate[bot] bc860c733a fix(types): update dependency type-fest to v3.7.1 2023-03-27 08:31:03 +00: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
renovate[bot] 6912fa14f2 fix(types): update dependency type-fest to v3.7.0 2023-03-23 11:22:16 +00:00
Christopher Hiller 309fe4c964 chore: lint everything 2023-03-22 16:25:22 -07:00
Christopher Hiller 34891f5657 fix(base-driver,types): fix websocket-related types on AppiumServer 2023-03-22 16:25:22 -07:00
Mykola Mokhnach d3e91222c8 chore(base-driver): Check if a valid Error instance is thrown (#18369) 2023-03-22 07:20:32 +01: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
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
2023-03-08 11:43:18 -08:00
Christopher Hiller 58b4790b1d chore: lint all the typescript 2023-03-06 15:21:58 -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
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 1b70551055 fix(base-driver): remove needless static prop breaking the build 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
renovate[bot] ed1d3aae61 fix(images-plugin): update dependency lru-cache to v7.18.1 2023-03-01 17:36:54 +00:00
renovate[bot] d1d5ecef87 fix(images-plugin): update dependency lru-cache to v7.17.2 2023-03-01 12:30:17 +00:00
renovate[bot] 471a4b57e6 fix(types): update dependency type-fest to v3.6.1 2023-02-28 05:28:06 +00:00
Christopher Hiller 0f196bad4a chore(types,base-driver): move/remove generics and constraints in Driver
These types were "wrong" in that it is exceedingly difficult to successfully implement `getLog()`, `getLogTypes()`, `supportLogTypes`, etc., in a third-party driver because you'd need to implement _all of it_ or _none of it_.  It's especially bad because it does this without prescribing where the logs should be stored (which is by design).  Oops.

This also moves some generics in the "find" mixins.  This may change again later, but it's unclear that any given driver must declare what a "context" is, and that there can only be one per driver.
2023-02-27 14:15:11 -08:00
Christopher Hiller 7b49356322 chore: publish
- appium@2.0.0-beta.56
 - @appium/base-driver@9.3.2
 - @appium/base-plugin@2.2.2
 - @appium/doctor@2.0.8
 - @appium/docutils@0.2.2
 - @appium/driver-test-support@0.4.0
 - @appium/execute-driver-plugin@3.0.7
 - @appium/fake-driver@5.2.0
 - @appium/fake-plugin@3.1.6
 - @appium/images-plugin@2.0.7
 - @appium/opencv@2.0.7
 - @appium/plugin-test-support@0.3.8
 - @appium/schema@0.2.5
 - @appium/support@3.1.6
 - @appium/test-support@3.0.8
 - @appium/typedoc-plugin-appium@0.5.0
 - @appium/types@0.10.0
 - @appium/universal-xml-plugin@1.0.6
2023-02-24 13:43:18 -08:00
renovate[bot] eb73be8303 fix(images-plugin): update dependency lru-cache to v7.17.0 2023-02-23 22:18:02 +00:00
renovate[bot] 49f157d63e fix(support): update dependency axios to v1.3.4 2023-02-23 16:23:10 +00:00
Christopher Hiller 2ebb16b077 chore(base-driver): avoid public class field assignment
this should avert potential future bugs when drivers attempt to override these properties
2023-02-22 13:40:55 -08:00
renovate[bot] 4b10322b80 fix(images-plugin): update dependency lru-cache to v7.16.2 2023-02-22 17:43:23 +00:00
renovate[bot] 1cb01a5e85 fix(base-driver): update dependency body-parser to v1.20.2 2023-02-22 11:20:27 +00:00
renovate[bot] 2fa6bf1e11 fix(images-plugin): update dependency lru-cache to v7.16.1 2023-02-18 15:41:23 +00:00
renovate[bot] 08a6f3a308 fix(types): update dependency type-fest to v3.6.0 2023-02-17 13:47:51 -08:00
renovate[bot] d54901a9c3 fix(images-plugin): update dependency lru-cache to v7.16.0 2023-02-17 18:03:38 +00:00
renovate[bot] 4cf8dbc0d3 fix(images-plugin): update dependency lru-cache to v7.15.0 2023-02-16 12:03:52 +00:00
Christopher Hiller 61a0275e29 fix(base-driver): fix type problem w/r/t axios headers 2023-02-15 16:19:30 -08:00
Christopher Hiller 8f9de63e4a fix: update axios to v1.3.3
because renovate cannot seem to do it
2023-02-15 16:19:30 -08:00
Jonathan Lipps 11e7ad0cd4 fix: appium:options should work via --default-capabilities
fix #18191
2023-02-13 16:20:21 -08:00
renovate[bot] b4416c5c0f fix(types): update dependency type-fest to v3.5.7 2023-02-11 09:08:44 +00:00
Christopher Hiller 322363b887 chore: publish
- appium@2.0.0-beta.54
 - @appium/base-driver@9.3.1
 - @appium/base-plugin@2.2.1
 - @appium/doctor@2.0.7
 - @appium/docutils@0.2.0
 - @appium/driver-test-support@0.3.7
 - @appium/execute-driver-plugin@3.0.6
 - @appium/fake-driver@5.1.5
 - @appium/fake-plugin@3.1.5
 - @appium/images-plugin@2.0.6
 - @appium/opencv@2.0.6
 - @appium/plugin-test-support@0.3.7
 - @appium/relaxed-caps-plugin@1.0.5
 - @appium/schema@0.2.4
 - @appium/support@3.1.5
 - @appium/test-support@3.0.7
 - @appium/tsconfig@0.2.4
 - @appium/typedoc-plugin-appium@0.4.0
 - @appium/types@0.9.1
 - @appium/universal-xml-plugin@1.0.5
2023-02-09 11:44:44 -08:00
renovate[bot] c2289ad607 fix(base-driver): update definitelytyped 2023-02-08 15:14:04 +00:00
renovate[bot] 775c990f9d fix(types): update dependency type-fest to v3.5.6 2023-02-07 15:52:09 -08:00
renovate[bot] 9bf320c87c fix(types): update dependency type-fest to v3.5.5 2023-02-05 04:43:53 +00:00
renovate[bot] 172bdae436 fix(types): update definitelytyped 2023-02-05 00:47:22 +00:00
renovate[bot] cfb529772c fix(types): update dependency type-fest to v3.5.4 2023-01-30 15:37:17 +00:00
renovate[bot] 644f300cd8 fix(types): update dependency @types/express to v4.17.16 2023-01-24 10:56:47 +00:00