Commit Graph
26 Commits
Author SHA1 Message Date
Kazuaki Matsuo e391bb249f fix: use native ESM entrypoint detection (#22868) 2026-10-04 17:39:35 +02:00
Mykola Mokhnach 506bfeeb9a refactor(base-driver)!: replace command mixin with explicit named exports (#22741)
BREAKING CHANGE: @appium/base-driver's default export (BaseDriver) and @appium/base-driver's basedriver/helpers.js default export are removed; use the named exports instead. The appium/driver.js and driver.d.ts re-exports of the default are removed accordingly.
BREAKING CHANGE: BaseDriver.reset() is removed; it was unused, not part of any protocol route or the Driver interface, and had no callers in this monorepo or any driver package that was checked.
BREAKING CHANGE: BaseDriver's constructor is removed in favor of inherited DriverCore construction; opts is no longer a required constructor argument (it now defaults to {}, matching DriverCore).
2026-09-07 20:58:00 +02:00
Mykola Mokhnach 3516e50ce6 feat!: convert remaining monorepo packages to ESM-only (#22674)
BREAKING CHANGE: require('@appium/support') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/base-driver') no longer works; drivers extending BaseDriver via require must switch to import.
BREAKING CHANGE: require('@appium/base-plugin') no longer works; plugins extending BasePlugin via require must switch to import.
BREAKING CHANGE: require('appium') no longer works; plugins extending the package via require must switch to import.
BREAKING CHANGE: require('@appium/fake-plugin') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/fake-driver') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/types') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/logger') no longer works; consumers must import it instead.
BREAKING CHANGE: require('@appium/schema') no longer works; consumers must import it instead.
2026-08-29 17:25:29 +02:00
Mykola Mokhnach f06226b7bb feat(base-driver): add httpServer.frontRouter for global extension middleware (#22632) 2026-08-17 08:22:11 +02:00
Mykola Mokhnach a49ae68f13 test(appium): add e2e coverage for extension-provided CLI args (#22629) 2026-08-12 19:18:02 +02:00
Mykola Mokhnach 08d50889c2 chore: Migrate from prettier to oxfmt (#22450) 2026-07-01 08:54:13 +02:00
Mykola Mokhnach 1a46d7d61e chore: Apply format (#22350) 2026-06-05 08:08:54 +02:00
Mykola Mokhnach bfac5ab9ec chore(fake-driver,fake-plugin): Ditch lodash (#22322) 2026-05-29 18:58:32 +02:00
Jonathan Lipps 97c879cdd0 feat: add IPC channels per session for drivers and plugins to communicate (#22211)
* feat: add IPC channels per session for drivers and plugins to communicate (fix #22206)

* lint

* export AppiumIpc

* fix test issues

* import AppiumIpc directly from basedriver

* fakedriver is used directly outside of appium so can't rely on existence of IPC

* make ipc functions async with lock and better types

* fix assignIpc types

* deduplicate session object deletion

* ipcGuard -> withIpc

* address various review comments

* lint

* address copilot and other review comments

* store only last message. change model to use subscription object and async generator

* enforce max message size in bytes

* fix tests and call the message payload 'data' for clarity

* lint

* make assignIpc optional on drivers for backwards compatibility

* add error handling in startClock since it is usually not awaited

* add docs

* remove todo comment

* apply copilot and eglitise suggestions

* add typedoc

* add error handling to onIpcInit

* apply more suggestions

* fix schema unit test

* apply more suggestions

* add links to ipc examples

* make minimum ipc message size 1 instead of 0

* ensure publisher names are friendly to consumers

* fix ipc message time unit

* use already included sizeof for objs

* just pass error obj to log

* be more typescriptey about our ipc guard

* make max obj size part of opts for appiumipc

* let unsubscribe return whether it worked

* improve ipc types and shapes

* apply master package-lock.json

* update schema config

* use javascript naming conventions

* clarify distinction between message and payload (data)

* ensure async iterator loop ends when unsubscribe is called

* ensure the right things happen when you unsubscribe

* make require ipc more ergonomic

* remove unnecessary async locks and de-asyncify methods

* simplify interface and just use subscriber/plugin names

* fix docs

* fix lint

* document isActive

* add note about topic namespace

* use sleep instead of delay

* restrict the ipc payload data type to something that can be cloned

* clarify topic namespacing recommendation

* make sure listeners and promises are cleaned up in async iterator

* clean up ipc internal names

* readonly

* address review comments

* make ipcmessage readonly

* readonly cause why not
2026-05-14 16:56:02 -07:00
Mykola Mokhnach efe167f59a fix: All the rest of linter warnings (#22183) 2026-04-17 19:24:57 +02:00
Edgars Eglītis edae4ac239 chore(fake-plugin): drop bluebird (#21992) 2026-02-20 14:36:30 +02:00
Mykola Mokhnach 7b139d7e35 feat(fake-plugin): Migrate to typescript (#21913) 2026-02-02 09:48:44 +01:00
Mykola Mokhnach 4716f40226 feat(base-driver): Remove deprecated routes (#21134) 2025-03-24 08:07:12 +01:00
Jonathan Lipps 8df1c217a1 feat(appium,base-driver,base-plugin): allow plugins to define custom bidi commands and emit bidi events (#20876)
* feat: allow drivers to define their own bidi commands

* test(appium): refactor plugin tests server startup

* feat: allow plugins to define their own bidi commands and events

* fix(fake-driver,fake-plugin): ensure custom bidi commands events have vendor prefixes

* feat(appium): link plugin and driver objects in log lines when possible

* fix(appium,base-driver): ensure new methods for plugins aren't called without existence checks
2025-01-08 13:45:36 -08:00
Mykola Mokhnach 25ea9f73bc chore: Migrate to flat ESLint config (v9) (#20856) 2024-12-27 20:42:36 +01:00
Christopher Hiller 640e0ae30f chore(appium,fake-plugin): squelch eslint warnings
I am not sure why the `@typescript/eslint` rule overrides the ESLint one, but it does. Squelched!
2023-04-14 12:23:54 -07:00
Christopher Hiller c321441451 chore(fake-plugin): avoid public class field assignment 2023-02-22 13:40:55 -08:00
Jonathan Lipps 11015b8871 test(appium): add e2e tests for plugin use of executeMethod(Map) 2023-01-20 14:21:08 -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 d4b983328a feat(appium,base-driver,fake-driver,fake-plugin,test-support,types): updateServer receives cliArgs param
This PR passes a `cliArgs` parameter to the static method `updateServer` of drivers and plugins so they can take action on the server configuration based on the content of the arguments.

Note that `cliArgs` is a misnomer, because these args can also come from configuration files.

Closes #17304
2022-08-08 14:00:58 -07:00
Christopher Hiller 2bd8b417a4 fix(fake-plugin): add index.js to published package
Restore (?) missing scripts
2022-06-13 16:08:17 -07:00
Christopher Hiller eb460b915a feat(fake-plugin): use peer deps
BREAKING CHANGE:

This now requires a peer dependency on `appium`
2022-05-26 12:07:17 -07:00
Christopher Hiller 55504514a9 chore(fake-plugin): remove now-invalid constructor 2022-05-20 14:08:52 -07:00
Christopher Hiller 133db5355f chore: reformat everything
this reformats all `.js`, `.ts`, and `.d.ts` files.
2022-05-09 19:09:50 -07:00
Christopher Hiller ac575cc81f fix(fake-plugin): fix bad merge 2022-04-14 14:30:00 -07:00
Christopher Hiller 5b54017054 chore: relocated plugins
- left some necessary config in packages/plugins-temp which will get removed after full integration

# Conflicts:
#	packages/appium-plugins/.github/workflows/main.yml
#	packages/appium-plugins/packages/base/package-lock.json
#	packages/appium-plugins/packages/base/package.json
#	packages/appium-plugins/packages/fake/package-lock.json
#	packages/appium-plugins/packages/images/package-lock.json
#	packages/appium-plugins/packages/images/package.json
#	packages/appium-plugins/packages/relaxed-caps/package-lock.json
#	packages/appium-plugins/packages/relaxed-caps/package.json
#	packages/appium-plugins/packages/universal-xml/package-lock.json
#	packages/fake-plugin/lib/logger.js
#	packages/fake-plugin/lib/scripts/fake-error.js
#	packages/fake-plugin/lib/scripts/fake-success.js
#	packages/fake-plugin/package.json
#	packages/universal-xml-plugin/package.json
2022-04-14 14:30:00 -07:00