Commit Graph
21 Commits
Author SHA1 Message Date
Mykola Mokhnach 84f9b4dbe4 chore: Remove the obsolete @appium/test-support package (#22351) 2026-06-05 11:38:26 +02:00
Mykola Mokhnach 1a46d7d61e chore: Apply format (#22350) 2026-06-05 08:08:54 +02:00
Mykola Mokhnach 0264775ecb feat: Limit the maximum count of topics per session and make it configurable (#22279) 2026-05-18 07:22:48 +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 d43f749fc7 feat(schema): Migrate to typescript (#21900) 2026-01-28 21:32:02 +01:00
Mykola Mokhnach eb1b156146 feat(appium): Add a command line parameter to configure HTTP server request timeout (#21003) 2025-02-19 20:45:20 +01:00
Mykola Mokhnach 56618886ed feat(appium): Make server graceful shutdown timeout configurable via command line args (#20641) 2024-10-05 16:14:31 +02:00
Jonathan Lipps 45cc948671 fix(schema): edit a comment in order to trigger a publish 2024-06-11 12:05:50 -07:00
Mykola Mokhnach 1e86537e94 feat(appium): Add a possibility to print logs in json format (#20224) 2024-06-08 08:08:37 +02:00
Mykola Mokhnach 22ca747107 fix(appium): Respect the value of no-perms-check server arg (#19518) 2023-12-12 09:24:17 +01:00
Mykola Mokhnach 06e7f3489d feat(appium): Load drivers and plugins asynchronously (#19512) 2023-12-12 09:15:49 +01:00
Mykola Mokhnach 5926919177 feat(base-driver): Add server support of TLS and SPDY protocols (#19105) 2023-09-08 08:02:56 +02: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
Christopher Hiller fd2c72fd88 fix(types): fix broken appium config schema types, temporarily
This appears to be a bug in `json-schema-to-typescript`, where the `ipv6` type converts to `{[key: string]: unknown}` instead of `string`.

For now, we need to drop all formatting requirements from the `address` prop until this is fixed.

This did not break CI because the `build` script of `@appium/types` was run either _after_ building the rest of the project, or not at all, and the resulting change to `appium-config.ts` was not committed.
2023-05-31 14:02:28 -07:00
Mykola Mokhnach 8f63dabb5d feat(appium): Allow to provide ipv6 addresses and handle broadcast addresses in logs (#18674) 2023-05-24 08:26:10 +02:00
Christopher Hiller 65c8ed1adc chore(appium): fix various broken tests tests (#17787)
- update flattened schema fixture to match actual schema
- plugin/driver e2e tests were also busted

NOTE: test that checks for a symlink when doing a local install is _not_ passing in CI and I cannot reproduce locally. I have disabled the test for now.
2022-11-18 17:00:28 -08:00
Kazuaki MatsuoandJonathan Lipps 6082118de0 docs(appium): update migration guide more (#17770)
* address wrap with qupte for Win env

* use the comma-delimited string

* Update migrating-1-to-2.md

* Update appium-config-schema.js

* Update migrating-1-to-2.md

* Apply suggestions from code review

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>

Co-authored-by: Jonathan Lipps <jlipps@gmail.com>
2022-11-16 17:18:52 -08:00
Christopher Hiller 09c5901719 fix(schema): add definition for log filters 2022-11-02 18:39:16 -07:00
Christopher Hiller 726a7e10de feat(schema): allow root $schema prop
this allows a config file to reference the config schema for validation via editor/IDE
2022-11-02 18:39:16 -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 f33b87bbf9 chore(appium,types,schema): create @appium/schema
`@appium/schema` is a package which was extracted from `appium`.  It _only_ contains the schema.  The impetus here was to avoid cyclical dependencies, since `appium` depends on `@appium/types`, and `@appium/types` depends on the schema.  This package breaks the cycle.

The `scripts/generate-schema-json.js` (which converts the compiled JS schema file into JSON) has moved into this package, and the generated JSON file is now under version control.  This is because the `generate-schema-types.js` script (previously `generate-schema-declarations`) depends on it, and `@appium/types` depends on the generated types.  The generated types are _also_ under version control.  I do not expect the schema to change often, so I believe the tradeoff to be worth it.

## @appium/schema

`lib/appium-config-schema.js` is the "single source of truth" for the schema.

## appium

- Removed schema source
- Removed namespaces from internal types because they suck (see change to `types/index.d.ts`)
- Removed unused `continuation-local-storage`
- Add dep for `@appium/schema`
- Added a TS project dependency on `@appium/schema`

## @appium/types

- The "sources" have moved from `src` to `lib` for consistency.
- `lib/appium-config.ts` (the generated types) are now under version control.
- `lib/schema/` has been removed (it previously held the JSON schema artifact)
- `scripts/generate-schema-declarations.js` becomes `scripts/generate-schema-types.js`
- Updated scripts in `package.json`
- Added dep for `@appium/schema`
- Added a TS project dependency on `@appium/schema`

## Other

- Reorganize root `tsconfig.json`; add `schema` reference; remove unused `noEmit: true`
- Sort root `package.json`
- Remove schema JSON and schema declarations scripts, since those are now both handled in their respective packages
- Remove `lint-staged` config for schema file, since it didn't work right anyway (still need to do something about this, but probably doesn't need to be in a precommit hook)
- Remove stuff from `.gitignore`
2022-04-07 14:05:41 -07:00