Commit Graph

10077 Commits

Author SHA1 Message Date
Christopher Hiller
8a6a4ba7e7 chore: publish
- appium@2.0.0-rc.5
 - @appium/base-driver@9.3.15
 - @appium/base-plugin@2.2.15
 - @appium/doctor@2.0.21
 - @appium/docutils@0.4.4
 - @appium/driver-test-support@0.4.10
 - @appium/eslint-config-appium@8.0.4
 - @appium/fake-driver@5.2.6
 - @appium/fake-plugin@3.1.19
 - @appium/plugin-test-support@0.3.18
 - @appium/schema@0.3.1
 - @appium/support@4.1.2
 - @appium/test-support@3.0.20
 - @appium/types@0.13.2
@appium/base-driver@9.3.15 @appium/base-plugin@2.2.15 @appium/doctor@2.0.21 @appium/docutils@0.4.4 @appium/driver-test-support@0.4.10 @appium/eslint-config-appium@8.0.4 @appium/fake-driver@5.2.6 @appium/fake-plugin@3.1.19 @appium/plugin-test-support@0.3.18 @appium/schema@0.3.1 @appium/support@4.1.2 @appium/test-support@3.0.20 @appium/types@0.13.2 appium@2.0.0-rc.5
2023-07-03 13:18:58 -07:00
Christopher Hiller
52b646c65b chore(typedoc-plugin-appium): update snapshots 2023-07-03 13:10:51 -07:00
Christopher Hiller
2b351705d4 fix(base-driver): pass thru all type args to ExternalDriver
- `core` module is now TS
- `constants` module is now TS
- export missing `W3C_ELEMENT_KEY`
- `JWProxy.command` returns `Promise<unknown>`.  deal with it
- updated some type tests
2023-07-03 13:10:51 -07:00
Christopher Hiller
c13333bb97 fix(appium): type fixes for ts v5 2023-07-03 13:10:51 -07:00
Christopher Hiller
62f4244753 fix(types): update some more types to reflect reality
- added a `Protocol` type for some string constants
- `proxyRouteIsAvoided` optionally accepts a `body` arg
- `Core<C>.driverForSession` does not actually return something using type `C`.
- `ExternalDriver` passes thru all type args to `Driver`. this should be non-breaking
- `StringRecord` is more appropriate type for default driver settings
- `Constraints` should be readonly
2023-07-03 13:10:51 -07:00
Christopher Hiller
26eb766a79 chore(base-driver): actually run type tests 2023-07-03 13:10:51 -07:00
Christopher Hiller
679865ed2f fix(eslint-config-appium): remove prototype assignment warning 2023-07-03 13:10:51 -07:00
Christopher Hiller
f1d768c62c chore: upgrade typescript
we need to stay at v5.0.x for now
2023-07-03 13:10:51 -07:00
Christopher Hiller
d6cca5175c fix(types): separate the type of opts from initialOpts
A thing we know about the `opts` object passed in to a driver constructor is that it does _not_ contain caps.  This value is retained in `this.initialOpts`.  Upon session creation, it _does_ contain caps.

This adds a new type, `InitialOpts`, which is the first parameter to a driver.  In the future, it may accept a type argument, as currently any extension-specific options (defined via schema in `package.json`) are not typed.

Because `DriverOpts` is a superset of `InitialOpts`, this should not be a breaking change.
2023-07-03 13:10:51 -07:00
Christopher Hiller
3d614d6d41 fix(base-driver): allow subclass to define shape of settings object
The mixin approach prevented subclasses of BaseDriver from narrowing the type of `this.settings`.  Now, that's possible.

Also:
- removed an unused type argument from BD constructor
- and did some typedef aliasing
- remove unneeded type assertion from log mixin
2023-07-03 13:10:51 -07:00
Christopher Hiller
ee9b2a30de fix(types): ensure return type of deleteSession can always be void
a type aliased to `void` is not the same as returning `void`, apparently.  this might be fixed in newer TS versions
2023-07-03 13:10:51 -07:00
Christopher Hiller
e30ad0e88c chore(appium,types): remove some useless type arguments 2023-07-03 13:10:51 -07:00
Christopher Hiller
01061b2919 fix(types,base-driver): remove deviceName from base constraints
This cap was conflicting with constraints defined in subclasses.  Currently, it isn't possible to cleanly "override" constraints.  Given `deviceName` is not used anywhere within base-driver's source, this seems like a decent workaround for now.
2023-07-03 13:10:51 -07:00
Christopher Hiller
24e7aeca7d fix(types): fix signature of updateSettings 2023-07-03 13:10:51 -07:00
renovate[bot]
ed1856d720 fix(support): update dependency semver to v7.5.3 2023-07-01 16:31:57 +00:00
renovate[bot]
757fbaaf42 chore(deps): update dependency @types/node to v18.16.19 2023-07-01 12:54:42 +00:00
renovate[bot]
fdd2ac098d fix(doctor): update dependency appium-adb to v9.11.7 2023-07-01 10:44:15 +00:00
renovate[bot]
3906f7d1ca chore(docutils): update dependency mkdocs-material to v9.1.17 2023-06-30 22:01:32 +00:00
Christopher Hiller
f09fbb64dc fix(appium): restrict address to ipv6/hostname (#18824)
This resolves #18716.

For whatever reason, `json-schema-to-typescript` needed `"type": "string"` in there.  See https://github.com/bcherny/json-schema-to-typescript/issues/528 for further discussion
2023-06-30 13:33:34 -07:00
Mykola Mokhnach
97fe159276 chore(appium): Improve the error message on config load error (#18829) 2023-06-30 20:35:17 +02:00
renovate[bot]
cb145875c0 chore(deps): update commitlint monorepo to v17.6.6 2023-06-30 17:38:50 +00:00
renovate[bot]
d75338f1c8 chore(deps): update eslint-related packages to v5.59.11 2023-06-30 13:19:49 +00:00
renovate[bot]
67e7140216 chore(deps): update dependency lint-staged to v13.2.3 2023-06-30 11:39:58 +00:00
Christopher Hiller
81256f8f90 chore(types): fix clean command 2023-06-29 17:09:25 -07:00
Christopher Hiller
0bbb25dfb4 chore(base-driver,driver-test-support): do not run basedriver e2e tests in parallel
also: rewrote event timings tests due to it being unclear which assertion actually failed. one assertion per test.
2023-06-29 17:09:25 -07:00
renovate[bot]
5263366744 chore(deps): update dependency json-schema-to-typescript to v13.0.2 2023-06-29 20:56:36 +00:00
Christopher Hiller
4ab2780978 chore: run eslint --fix on ts files before commit 2023-06-29 13:14:37 -07:00
Jonathan Lipps
58b71869d1 chore: publish
- appium@2.0.0-rc.4
 - @appium/base-driver@9.3.14
 - @appium/base-plugin@2.2.14
 - @appium/doctor@2.0.20
 - @appium/docutils@0.4.3
 - @appium/driver-test-support@0.4.9
 - @appium/fake-plugin@3.1.18
 - @appium/plugin-test-support@0.3.17
 - @appium/support@4.1.1
 - @appium/test-support@3.0.19
 - @appium/types@0.13.1
@appium/base-driver@9.3.14 @appium/base-plugin@2.2.14 @appium/doctor@2.0.20 @appium/docutils@0.4.3 @appium/driver-test-support@0.4.9 @appium/fake-plugin@3.1.18 @appium/plugin-test-support@0.3.17 @appium/support@4.1.1 @appium/test-support@3.0.19 @appium/types@0.13.1 appium@2.0.0-rc.4
2023-06-29 11:17:15 -07:00
renovate[bot]
08a1f1be94 chore(deps): update definitelytyped 2023-06-28 10:12:12 +00:00
renovate[bot]
b7cecfffb5 chore(workflows): update actions/checkout digest to c85c95e 2023-06-28 08:20:51 +00:00
Kazuaki Matsuo
52a755a913 fix(docutils): docs versioning and update latest (#18804)
* fix: docs versioning and update latest

* fix lint
2023-06-27 21:13:12 -07:00
Mykola Mokhnach
35e0012d8a chore(appium): Use the actual server address in the logged URL (#18809) 2023-06-27 12:59:55 +02:00
Jonathan Lipps
ed20e00754 chore: publish
- appium@2.0.0-rc.3
 - @appium/base-driver@9.3.13
 - @appium/base-plugin@2.2.13
 - @appium/doctor@2.0.19
 - @appium/docutils@0.4.2
 - @appium/driver-test-support@0.4.8
 - @appium/fake-driver@5.2.5
 - @appium/fake-plugin@3.1.17
 - @appium/plugin-test-support@0.3.16
 - @appium/support@4.1.0
 - @appium/test-support@3.0.18
 - @appium/types@0.13.0
@appium/base-driver@9.3.13 @appium/base-plugin@2.2.13 @appium/doctor@2.0.19 @appium/docutils@0.4.2 @appium/driver-test-support@0.4.8 @appium/fake-driver@5.2.5 @appium/fake-plugin@3.1.17 @appium/plugin-test-support@0.3.16 @appium/support@4.1.0 @appium/test-support@3.0.18 @appium/types@0.13.0 appium@2.0.0-rc.3
2023-06-15 13:57:59 -07:00
Christopher Hiller
9e60e80b13 chore(renovate): add get-stream to major upgrade ban list 2023-06-15 11:57:15 -07:00
Jonathan Lipps
1a5b8cca2d fix(docutils): set mike version to major.minor by default (#18770)
* fix(docutils): set mike version to major.minor by default

* Update packages/docutils/lib/builder/deploy.ts

Co-authored-by: Christopher Hiller <boneskull@boneskull.com>

---------

Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2023-06-15 10:19:05 -07:00
Mykola Mokhnach
ced560206b ci: Update bug report template (#18766) 2023-06-15 06:30:23 +02:00
Christopher Hiller
7dbf6f2cd3 chore(typedoc-plugin-appium): update snapshots 2023-06-14 16:21:51 -07:00
Christopher Hiller
84c49b1529 chore(support): fix module paths in some tests 2023-06-14 16:21:51 -07:00
Christopher Hiller
81bc527be6 fix(types): various fixes for reality
- because BaseDriver implements `findElOrEls` (technically), any subclasses must not inherit an interface containing a non-identical `findElOrEls` -- not even narrowing.  so to avoid this, we will need to make it as broad as possible; no more generic `Ctx`
- likewise with `getLog`
- fix return type of `setGeoLocation`
- fix return type of `getPerformanceData`
- fix return type of `removeApp`
- fix return type of `hideKeyboard`
- fix return type of `getSystemBars`
- fix signature of various `touch*` methods
- fix return type of `setNetworkConnection`

alternatively, the deprecated methods mentioned here should be removed.
2023-06-14 16:21:51 -07:00
Christopher Hiller
2e909478e9 chore(types): remove unused interfaces
Both `StartScreenRecordOptions` and `StopScreenRecordOptions` are for deprecated core APIs and are defined individually by drivers
2023-06-14 16:21:51 -07:00
Christopher Hiller
00ae1625d7 fix(types,fake-driver): getLog doesn't necessarily return an array 2023-06-14 16:21:51 -07:00
Christopher Hiller
88293f8039 feat(support): export a bunch of types that weren't properly exported 2023-06-14 16:21:51 -07:00
Christopher Hiller
54a4a8da03 fix(base-driver): update def of findElOrEls and findElOrElsWithProcessing
- adds some types to the `Proxy` class
- make `isErrorType()` a proper type guard
2023-06-14 16:21:51 -07:00
Christopher Hiller
598b255e8d fix(fake-driver): update definition of findElOrEls 2023-06-14 16:21:51 -07:00
Christopher Hiller
63a5c22127 fix(types)!: use overload instead of broken conditional type in findElOrEls
BREAKING CHANGE: This changes the def of `findElOrEls` and `findElOrElsWithProcessing` in `ExternalDriver` in a breaking manner.

So conditional types don't work like how I was using them.  They work in capital-T-types (`type`), but they don't work as return values.  Instead, what we should have is an overload.  in this case, the function can be called one of two ways, and it returns a different thing depending on those values.  _unfortunately_ this is a little hinky to implement, given that overloads are unsupported in _object literals_.  they are supported in function statements or expressions, and they are supported in class definitions, but not object literals.  you'll see what needs to happen to make this work in `FakeDriver` and `BaseDriver` in subsequent changesets; essentially the function must be defined outside of the object literal and then stuffed in there.

The other change here changes an `object` type (which does not allow arbitrary properties) to a `StringRecord` type within the type which converts `Constraints` to `Capabilities`.  This affects caps for some drivers such as `chromedriverArgs` in `appium-android-driver`; anywhere where the constraint has `isObject: true`.
2023-06-14 16:21:51 -07:00
Jonathan Lipps
af066eb5c3 chore: publish
- appium@2.0.0-rc.2
 - @appium/base-driver@9.3.12
 - @appium/base-plugin@2.2.12
 - @appium/doctor@2.0.18
 - @appium/docutils@0.4.1
 - @appium/fake-plugin@3.1.16
 - @appium/support@4.0.3
 - @appium/test-support@3.0.17
@appium/base-driver@9.3.12 @appium/base-plugin@2.2.12 @appium/doctor@2.0.18 @appium/docutils@0.4.1 @appium/fake-plugin@3.1.16 @appium/support@4.0.3 @appium/test-support@3.0.17 appium@2.0.0-rc.2
2023-06-14 11:21:00 -07:00
Christopher Hiller
e5254b5b45 fix(docutils): fixes some weirdness with default behavior and the "implies" keyword (#18751)
* fix(docutils): fixes some weirdness with default behavior and the "implies" keyword

- also squashes an errrant warning
- fix some diff logic when writing to `mkdocs.yml`

* fix(docutils): more robust mike-finding
2023-06-14 11:18:55 -07:00
Mykola Mokhnach
c18eb03261 fix(support): Require the optional sharp dep properly from mjpeg module (#18769) 2023-06-14 20:17:25 +02:00
Jonathan Lipps
d0ebbaa0c6 chore: publish
- appium@2.0.0-rc.1
 - @appium/base-driver@9.3.11
 - @appium/base-plugin@2.2.11
 - @appium/doctor@2.0.17
 - @appium/docutils@0.4.0
 - @appium/driver-test-support@0.4.7
 - @appium/execute-driver-plugin@3.0.14
 - @appium/fake-driver@5.2.4
 - @appium/fake-plugin@3.1.15
 - @appium/images-plugin@2.1.2
 - @appium/opencv@2.1.1
 - @appium/plugin-test-support@0.3.15
 - @appium/schema@0.3.0
 - @appium/strongbox@0.3.1
 - @appium/support@4.0.2
 - @appium/test-support@3.0.16
 - @appium/typedoc-plugin-appium@0.6.5
 - @appium/types@0.12.0
 - @appium/universal-xml-plugin@1.0.9
@appium/base-driver@9.3.11 @appium/base-plugin@2.2.11 @appium/doctor@2.0.17 @appium/docutils@0.4.0 @appium/driver-test-support@0.4.7 @appium/execute-driver-plugin@3.0.14 @appium/fake-driver@5.2.4 @appium/fake-plugin@3.1.15 @appium/images-plugin@2.1.2 @appium/opencv@2.1.1 @appium/plugin-test-support@0.3.15 @appium/schema@0.3.0 @appium/strongbox@0.3.1 @appium/support@4.0.2 @appium/test-support@3.0.16 @appium/typedoc-plugin-appium@0.6.5 @appium/types@0.12.0 @appium/universal-xml-plugin@1.0.9 appium@2.0.0-rc.1
2023-06-14 10:34:52 -07:00
Jonathan Lipps
1629f858f8 chore(appium): bump appium version to rc 2023-06-14 10:32:01 -07:00