Commit Graph

251 Commits

Author SHA1 Message Date
Jonathan Lipps 84b211330d chore: publish
- appium@2.0.0-beta.51
 - @appium/base-driver@9.2.2
 - @appium/base-plugin@2.1.2
 - @appium/doctor@2.0.4
 - @appium/docutils@0.1.4
 - @appium/driver-test-support@0.3.4
 - @appium/execute-driver-plugin@3.0.4
 - @appium/fake-driver@5.1.2
 - @appium/fake-plugin@3.1.2
 - @appium/images-plugin@2.0.4
 - @appium/opencv@2.0.4
 - @appium/plugin-test-support@0.3.4
 - @appium/relaxed-caps-plugin@1.0.3
 - @appium/schema@0.2.2
 - @appium/support@3.1.2
 - @appium/test-support@3.0.4
 - @appium/tsconfig@0.2.2
 - @appium/typedoc-plugin-appium@0.3.2
 - @appium/types@0.8.2
 - @appium/universal-xml-plugin@1.0.3
2023-01-13 13:25:31 -08:00
Jonathan Lipps e77e5a2a4f chore: update lerna git head 2023-01-13 13:23:55 -08:00
Jonathan Lipps 35f4e2b7e4 chore: publish
- appium@2.0.0-beta.50
 - @appium/base-driver@9.2.1
 - @appium/base-plugin@2.1.1
 - @appium/doctor@2.0.3
 - @appium/docutils@0.1.3
 - @appium/driver-test-support@0.3.3
 - @appium/execute-driver-plugin@3.0.3
 - @appium/fake-driver@5.1.1
 - @appium/fake-plugin@3.1.1
 - @appium/images-plugin@2.0.3
 - @appium/opencv@2.0.3
 - @appium/plugin-test-support@0.3.3
 - @appium/relaxed-caps-plugin@1.0.2
 - @appium/schema@0.2.1
 - @appium/support@3.1.1
 - @appium/test-support@3.0.3
 - @appium/tsconfig@0.2.1
 - @appium/typedoc-plugin-appium@0.3.1
 - @appium/types@0.8.1
 - @appium/universal-xml-plugin@1.0.2
2023-01-13 13:19:27 -08:00
Jonathan Lipps b48a697d5b chore: commit lerna publish changes 2023-01-13 13:12:00 -08:00
Jonathan Lipps 422142302f chore: publish
- appium@2.0.0-beta.49
 - @appium/base-driver@9.2.0
 - @appium/base-plugin@2.1.0
 - @appium/doctor@2.0.2
 - @appium/docutils@0.1.2
 - @appium/driver-test-support@0.3.2
 - @appium/execute-driver-plugin@3.0.2
 - @appium/fake-driver@5.1.0
 - @appium/fake-plugin@3.1.0
 - @appium/images-plugin@2.0.2
 - @appium/opencv@2.0.2
 - @appium/plugin-test-support@0.3.2
 - @appium/relaxed-caps-plugin@1.0.1
 - @appium/schema@0.2.0
 - @appium/support@3.1.0
 - @appium/test-support@3.0.2
 - @appium/tsconfig@0.2.0
 - @appium/typedoc-plugin-appium@0.3.0
 - @appium/types@0.8.0
 - @appium/universal-xml-plugin@1.0.1
2023-01-13 13:09:28 -08:00
Jonathan Lipps ad1dce5545 fix(base-driver): move setClipboard deprecation to correct place 2023-01-13 09:45:11 -08:00
Jonathan Lipps 7055a0b281 feat(base-driver): deprecate non-standard routes
and add deprecation warnings in the log when these routes are accessed
2023-01-12 10:11:08 -08:00
Jonathan Lipps d8588e107c docs: add ExternalDriver docstrings (#17985) 2023-01-10 14:36:48 -08:00
Christopher Hiller edde4882f0 fix(base-driver): add missing dependency @appium/types
Closes #18006
2023-01-06 12:56:26 -08:00
renovate[bot] 4b5ab4da7b fix(types): update dependency type-fest to v3.5.1 2023-01-05 12:11:09 +00:00
Christopher Hiller f036f0a612 chore: all pkgs consume @appium/tsconfig 2023-01-04 12:09:08 -08:00
Christopher Hiller fe7b7b6d21 chore(base-driver): do not use EmptyObject
I do not trust it
2023-01-03 12:50:53 -08:00
Christopher Hiller 8b33414901 feat(typedoc-appium-plugin): implement cross-referencing of methods
This is getting pretty close, but:

- Commands from a driver will show even w/o a `newMethodMap` or `execMethodMap`; it is able to understand that it's overriding `BaseDriver`
- It's also able to understand the associated routes
- And it's able to understand the routes even if `BaseDriver` does not implement it

Still working on the parameters display, but we have the name override working at least.

Added some docstrings in `fake-driver`, `base-driver` for testing
2023-01-03 12:50:53 -08:00
renovate[bot] 5291ca672b fix(support): update dependency axios to v1.2.2 2022-12-29 11:18:58 +00:00
Jonathan Lipps 23224cf002 fix(appium): inability to find automationName inside appium:options (#17966)
* fix(appium): inability to find automationName inside appium:options

we fixed this before but only fixed it in basedriver's createSession, which is not
actually called by Appium's createSession (though maybe it should be)

* test(base-driver): remove appium:options test
2022-12-28 10:54:39 -08:00
renovate[bot] 8c8bfe824d fix(types): update dependency type-fest to v3.5.0 2022-12-26 10:26:59 +00:00
Jonathan Lipps 2e76ba9607 chore: publish
- appium@2.0.0-beta.48
 - @appium/base-driver@9.1.0
 - @appium/base-plugin@2.0.1
 - @appium/doctor@2.0.1
 - @appium/docutils@0.1.1
 - @appium/driver-test-support@0.3.1
 - @appium/execute-driver-plugin@3.0.1
 - @appium/fake-plugin@3.0.1
 - @appium/images-plugin@2.0.1
 - @appium/opencv@2.0.1
 - @appium/plugin-test-support@0.3.1
 - @appium/support@3.0.1
 - @appium/test-support@3.0.1
 - @appium/typedoc-plugin-appium@0.2.1
 - @appium/types@0.7.0
2022-12-21 11:57:39 -08:00
Kazuaki Matsuo 316ecca8b1 feat(base): add get computed role and label in W3C v2 (#17928)
* feat(base): add get computed role and label in W3C v2

* add command names

* chore: add type

* chore: use `?` instead of `| null`

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

* Revert "chore: use `?` instead of `| null`"

This reverts commit 62af5e80ac.

Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2022-12-15 20:46:44 -08:00
Jonathan Lipps 0e195caafe fix: add 'webSocketUrl' as standard cap for bidi support (#17936) 2022-12-15 16:36:50 -08:00
Christopher Hiller fee1c98ee9 chore: run e2e tests in parallel
This change makes Lerna execute E2E tests across two cores.  Some of the slower E2E suites (`appium`, `support`, `opencv` and `base-driver`) also run in parallel via Mocha's `--parallel` flag.

In Appium, the main culprit was `cli.e2e.spec.js`, which I split into four files: `args` (argument handling), `cli-driver` (`driver` command), `cli-plugin` (`plugin` command) and `local` (behavior when Appium is a dependency).  This should run faster (in theory) since Mocha runs tests in parallel _per file_ and will expand to the available cores.

CI has limited cores, so this won't really help there--but it will speed up local development.  When running tests locally, you may see various delays, as Mocha buffers the output of a single test file.

This is a continuation of the work I did in #17252.
2022-12-14 13:28:31 -08:00
renovate[bot] 37f71c327a fix(types): update dependency type-fest to v3.4.0 2022-12-14 14:57:42 +00:00
renovate[bot] 172fcb9aff fix(types): update definitelytyped 2022-12-14 13:01:18 +00:00
Jonathan Lipps 0823f0b60e chore: publish
- appium@2.0.0-beta.47
 - @appium/base-driver@9.0.0
 - @appium/base-plugin@2.0.0
 - @appium/doctor@2.0.0
 - @appium/docutils@0.1.0
 - @appium/driver-test-support@0.3.0
 - @appium/eslint-config-appium@8.0.0
 - @appium/execute-driver-plugin@3.0.0
 - @appium/fake-driver@5.0.0
 - @appium/fake-plugin@3.0.0
 - @appium/gulp-plugins@8.0.0
 - @appium/images-plugin@2.0.0
 - @appium/opencv@2.0.0
 - @appium/plugin-test-support@0.3.0
 - @appium/relaxed-caps-plugin@1.0.0-beta.14
 - @appium/schema@0.1.0
 - @appium/support@3.0.0
 - @appium/test-support@3.0.0
 - @appium/typedoc-plugin-appium@0.2.0
 - @appium/types@0.6.0
 - @appium/universal-xml-plugin@1.0.0-beta.16
2022-12-13 16:10:05 -08:00
Jonathan Lipps 28876c19f3 fix(base-driver): update type for logExtraCaps 2022-12-13 14:51:49 -08:00
Christopher Hiller 3c32112c20 chore: use tsc for compilation across the board
- `@appium/gulp-plugins` does not use `tsc` and continues to use...whatever it uses.
- `@appium/doctor` now has generated declarations, though I didn't bother to do anything with the types
- rewrote swaths of build scripts:
  - removed the `fix` and `lint` scripts from each workspace (package) since I don't think they get used and they are of limited value
  - for tests and autoinstallation of extensions, added `ts-node` for on-the-fly compilation
  - workspaces _can_ define their own `build` and `clean` scripts (both should be required if either is used).  these do not currently get run when running `npm run dev`, but they do occur on a bare `npm install` from the monorepo root or a `npm run reinstall`.
  - `npm run rebuild` does a fresh rebuild, but does not clean any `node_modules` dirs nor does it reinstall anything.
  - removed `prepublishOnly` since `preversion` does the same thing
  - `npm test` now runs `build`/`lint` in parallel
- postinstall script of `appium` ("autoinstall") script now must call `npm run build` if in a fresh dev environment. this is because a) lifecycle scripts of packages run before lifecycle scripts in the monorepo root, and b) `postinstall` runs before `prepare`. so there's really no way around it; even using `ts-node` fails because other modules depend on `@appium/support/index.js` which expects the pkg to be built.

Closes #17746
Closes #17807
2022-12-06 11:21:05 -08:00
renovate[bot] 07d6ef6b8c fix(support): update dependency axios to v1.2.1 2022-12-06 14:04:30 +00:00
Christopher Hiller a1dbe6c43e chore!: set engines to minimum Node.js v14.17.0
BREAKING CHANGE: Appium now supports version range `^14.17.0 || ^16.13.0 || >=18.0.0`
2022-12-01 16:38:18 -08:00
renovate[bot] 32557f4bca fix(opencv): update definitelytyped 2022-11-29 10:32:09 +00:00
renovate[bot] 33aef07d24 fix(types): update dependency type-fest to v3.3.0 2022-11-28 15:47:38 +00:00
renovate[bot] b80b88bd9c fix(support): update dependency axios to v1.2.0 2022-11-23 15:34:11 +00:00
Christopher Hiller 1e00faf1a4 fix(base-driver): ensure caps is defined 2022-11-22 14:32:10 -08:00
Christopher Hiller 226cd018b4 fix(basedriver,types): fix type problems
These arose when attempting to generate docs

- Errors now all have optional params in constructors; normalized param name
- Validate `METHOD_MAP` against an actual `MethodMap`
- Set `cliArgs = {}` as default in `server()`
- Rename `SessionCommands` to `ISessionCommands`
- The "context" in `IFindCommands` is now a generic of any type
- Made various props in `ExternalDriver` optional; `ExternalDriver` now accepts generic `Constraints`
- `proxyCommand` accepts a generic return value
- Removed unnecessary second generic type param from `DriverClass`
2022-11-22 14:32:10 -08:00
Christopher Hiller f715bb4fd8 chore(base-driver,base-plugin,execute-driver-plugin,fake-driver,fake-plugin,images-plugin): update some types for typedoc 2022-11-22 14:32:10 -08:00
Christopher Hiller 4746080e54 feat(): experimental support for typedoc generation
Run `npm run typedoc` to generate docs in `typedoc-docs` dir.

I thought I'd take a few mins and set this up.  It was _mostly_ straightforward, except:

1. Figuring out the "entry point" for each package was difficult until I realized `.js` entry points are assumed to be compiled, and thus require a `sourceMappingUrl` reference. IMO this is probably a bug in TypeDoc
2. The `sourceMappingUrl` must reference an external sourcemap file; not an inline source map.  If it's an inline source map, the system tries to `fs.open` a large data-url.
3. The babel config does not control whether external sourcemaps are created; `@babel/cli` does. So I needed to change those.
4. Practically speaking, I don't see any drawback to external sourcemaps _yet_
5. TypeDoc has poor support for cross-package type references in monorepos, and I had to add a plugin which implements a workaround
6. Per some suggestions in the docs, I modified the order of references in the root `tsconfig.json` to start with "the biggest one first"

I didn't modify any types or docstrings anywhere.
2022-11-22 14:32:10 -08:00
renovate[bot] 70a9c144fc fix(fake-driver): update dependency asyncbox to v2.9.4 2022-11-20 08:46:46 +00:00
Mykola Mokhnach 91901153a1 fix(base-driver): Properly validate capabilities inside appium:options map (#17781) 2022-11-20 08:52:29 +01:00
renovate[bot] f5da9f31a3 fix(types): update dependency type-fest to v3.2.0 2022-11-06 08:41:14 +00:00
renovate[bot] 0d7c936b11 fix(images-plugin): update dependency lru-cache to v7.14.1 2022-11-03 08:48:00 +00:00
renovate[bot] b7b9453a5c chore(support): update dependency axios to v1 (#17568) 2022-11-01 14:22:52 +01:00
renovate[bot] 1342e13992 chore(base-driver): update dependency async-lock to v1.4.0 2022-10-29 13:50:17 +00:00
Christopher Hiller 0bd4e40b38 chore(base-driver,types): implement better types for custom log formats
Previously, the value of any `Driver#supportedLogTypes` prop would ultimately be unaware of what format the log data is actually stored in (and thus, what the `GET /session/:sessionId/log` cmd responds with).  Now this can be declared by using the `LogDef<C extends Constraints, LogEntry = string>` type.

Example:

```js
  supportedLogTypes = {
    debug: /** @type {import('@appium/types').LogDef<RokuDriverCapConstraints, string>} */ ({
      description: 'Roku debug logs',
      /** @param {RokuDriver} driver */
      async getter(driver) {
        return await ['foo'];
      },
    }),
  };
```

This is a log named `debug` which stores strings.  The `getter` function is always expected to return a type of `LogEntry[]` and receives a type of `Driver<C>`. In this case, it's the default log entry type (`string`) and `RokuDriver`, which implements `Driver<RokuDriverCapConstraints>` where `RokuDriverCapConstraints` extends `Constraints`.

It was kind of tricky since `supportedLogTypes` is an instance field and we don't have access to `this`, so cannot derive the type of the `driver` parameter from it, nor can we use `this` in the `ILogCommands` interface.

Renamed these various mixin interfaces to be prefixed with `I`. All of the mixins themselves (the implementations) are now driver-aware via the `C` type parameter and thus can reference driver-specific caps or options, if needed.
2022-10-24 15:07:59 -07:00
Christopher Hiller 6b3cc1a874 Publish
- appium@2.0.0-beta.46
 - @appium/base-driver@8.7.3
 - @appium/base-plugin@1.10.5
 - @appium/doctor@1.16.28
 - @appium/docutils@0.0.13
 - @appium/fake-plugin@2.1.3
 - @appium/gulp-plugins@7.0.8
 - @appium/support@2.61.1
 - @appium/test-support@2.0.2
2022-10-14 14:02:09 -07:00
Christopher Hiller 51d6d69ff1 fix(basedriver): ensure "opts" is defined at time of construction 2022-10-14 14:01:07 -07:00
Jonathan Lipps f545a6cde5 Publish
- appium@2.0.0-beta.45
 - @appium/base-driver@8.7.2
 - @appium/base-plugin@1.10.4
 - @appium/doctor@1.16.27
 - @appium/docutils@0.0.12
 - @appium/driver-test-support@0.2.1
 - @appium/execute-driver-plugin@2.0.6
 - @appium/fake-driver@4.2.2
 - @appium/fake-plugin@2.1.2
 - @appium/gulp-plugins@7.0.7
 - @appium/images-plugin@1.3.7
 - @appium/opencv@1.0.13
 - @appium/plugin-test-support@0.2.1
 - @appium/relaxed-caps-plugin@1.0.0-beta.13
 - @appium/support@2.61.0
 - @appium/test-support@2.0.1
 - @appium/types@0.5.0
 - @appium/universal-xml-plugin@1.0.0-beta.15
2022-10-13 16:25:16 -07:00
renovate[bot] 24a0efd695 chore(types): update dependency type-fest to v3.1.0 2022-10-10 10:13:17 +00:00
renovate[bot] 2a452cec4b chore(base-driver): update dependency express to v4.18.2 2022-10-09 08:06:46 +00:00
renovate[bot] 5bca642efa chore(base-driver): update dependency body-parser to v1.20.1 2022-10-07 13:18:13 +00:00
Christopher Hiller 9ce09845c8 chore(): replaced a ternary 2022-10-06 15:30:22 -07:00
Christopher Hiller b20d0b82a2 chore(appium,base-driver,driver-test-support,types): overhaul types for constraints and caps
The big idea here is:

1. `desiredCapConstraints` should always contain the constraints _for that driver_; it no longer contains the "base" constraints. This is the only thing that really required any logic changes (though they are somewhat spread out).  The "merged" constraints object is available via `_desiredCapConstraints`.
2. `Capabilities` and W3C-style `W3CCapabilities` are now _derived from_ constraints.  This absolves us (and extension authors) from needing to create an interface describing their capabilities.
3. Changes to caps and constraints now reflect in `DriverOpts` (`this.opts`) in drivers
4. `caps` and `originalCaps` declarations have moved from `Core` to `Driver`
5. TypeScript compiles the JS output from `@appium/types` (which is just a static "constraints" object)

Resolves #17518
2022-10-06 15:30:22 -07:00
Christopher Hiller cc04e6595b chore(): remove babel-runtime
Closes #17536
2022-10-06 11:51:49 -07:00