Compare commits

...
Author SHA1 Message Date
Jonathan Lipps e8a838417a chore: publish
- appium@2.11.0
 - @appium/base-driver@9.11.0
 - @appium/base-plugin@2.2.40
 - @appium/doctor@2.1.7
 - @appium/docutils@1.0.16
 - @appium/driver-test-support@0.6.4
 - @appium/execute-driver-plugin@3.0.31
 - @appium/fake-plugin@3.1.44
 - @appium/images-plugin@3.0.15
 - @appium/logger@1.5.0
 - @appium/plugin-test-support@0.3.39
 - @appium/support@5.1.0
 - @appium/test-support@3.0.44
 - @appium/types@0.21.0
2024-06-27 12:12:33 -07:00
renovate[bot] 9773a23b26 chore(deps): update dependency mocha to v10.5.2 2024-06-27 09:27:08 +00:00
renovate[bot] cc10b65ee5 chore(deps): update dependency json-schema-to-typescript to v14.1.0 2024-06-26 14:33:41 +00:00
renovate[bot] 530045ec53 chore(deps): update dependency @types/node to v20.14.9 2024-06-26 10:10:08 +00:00
renovate[bot] 8e0fa2c1b3 chore(deps): update eslint-related packages to v7.14.1 2024-06-25 18:27:57 +00:00
renovate[bot] d0d7548576 chore(deps): update dependency mocha to v10.5.1 2024-06-25 15:01:30 +00:00
renovate[bot] c7198b13e4 chore(deps): update dependency lerna to v8.1.5 2024-06-25 10:52:13 +00:00
renovate[bot] 4279cc6cee chore(docutils): update dependency mike to v2.1.2 2024-06-25 06:54:41 +00:00
renovate[bot] a746eefbbb fix(base-driver): update dependency path-to-regexp to v7 (#20279) 2024-06-25 08:50:56 +02:00
renovate[bot] b6de85359d chore(deps): update definitelytyped 2024-06-22 19:32:26 +00:00
Edgars Eglītis f2c8b69608 feat(appium): show extension update info message for newer major versions (#20283)
* feat(appium): add extension update info message if newer major version exists

* chore: add comment
2024-06-22 20:33:09 +03:00
Mykola Mokhnach 87fc50c2af fix(logger): Print an empty message if no arguments are provided (#20284) 2024-06-22 17:21:54 +02:00
Edgars Eglītis f25079354b feat(appium): show spinner during extension uninstall (#20282) 2024-06-22 00:05:43 +03:00
renovate[bot] 189bce88a0 fix(docutils): update dependency typescript to v5.5.2 2024-06-21 19:34:14 +00:00
renovate[bot] 15234bc055 fix(doctor): update dependency appium-adb to v12.4.4 2024-06-21 17:28:47 +00:00
renovate[bot] 073447ae4a fix(support): update dependency @types/uuid to v10 (#20280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 15:51:15 +03:00
renovate[bot] dd070dc51d chore(deps): update dependency @types/node to v20.14.7 2024-06-21 09:48:41 +00:00
Mykola Mokhnach 2882e71631 fix(base-driver): Check if app path is relative earlier (#20276) 2024-06-21 10:55:08 +02:00
Jonathan Lipps c106326169 docs(appium): README logos need to be fully qualified URLs (#20249)
So they should up on NPM OK.
2024-06-20 09:23:56 -07:00
renovate[bot] 5203480df6 chore(deps): update dependency @types/node to v20.14.6 2024-06-20 14:32:36 +00:00
Hans Chan 52ae52a90a docs: fix some deprecated links of w3c and android (#20272) 2024-06-20 12:39:31 +03:00
renovate[bot] d5e5186cb7 fix(support): update dependency glob to v10.4.2 (#20268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-20 09:30:54 +03:00
renovate[bot] 541246184d fix(support): update dependency teen_process to v2.1.6 2024-06-19 09:25:11 +00:00
renovate[bot] faf9623a65 fix(execute-driver-plugin): update dependency webdriverio to v8.39.0 2024-06-18 20:36:52 +00:00
renovate[bot] bc388db111 fix(support): update dependency teen_process to v2.1.5 2024-06-18 16:58:10 +00:00
renovate[bot] bdea13130c chore(deps): update eslint-related packages to v7.13.1 2024-06-18 12:29:03 +00:00
renovate[bot] cc23c22b60 chore(deps): update dependency @types/node to v20.14.5 2024-06-18 10:06:06 +00:00
kkb912002 f675abc27b feat(appium): Improve context logging (#20250) 2024-06-18 09:55:30 +02:00
renovate[bot] 6fa0ed57ff chore(deps): update dependency tsd to v0.31.1 (#20260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 09:38:13 +03:00
renovate[bot] 57bbb7f46d fix(support): update dependency uuid to v10 (#20236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-17 22:54:22 +02:00
renovate[bot] d2b24daba0 fix(appium): update dependency ws to v8.17.1 2024-06-17 12:23:23 +00:00
renovate[bot] 14d27fe2a4 chore(docutils): update dependency mkdocs-material to v9.5.27 2024-06-17 09:22:02 +00:00
renovate[bot] 19845531f5 fix(types): update dependency type-fest to v4.20.1 (#20255)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-16 22:21:42 +03:00
Mykola Mokhnach 3cc878d835 chore(appium): Tune logging for the log rules config issues (#20253) 2024-06-13 19:46:33 +02:00
renovate[bot] 4345a40a15 fix(doctor): update dependency appium-adb to v12.4.3 2024-06-13 12:04:45 +00:00
Jonathan Lipps 89e5f7e8db chore: publish
- appium@2.10.3
 - @appium/base-driver@9.10.3
 - @appium/base-plugin@2.2.39
 - @appium/doctor@2.1.6
 - @appium/docutils@1.0.15
 - @appium/driver-test-support@0.6.3
 - @appium/fake-plugin@3.1.43
 - @appium/images-plugin@3.0.14
 - @appium/logger@1.4.2
 - @appium/plugin-test-support@0.3.38
 - @appium/support@5.0.3
 - @appium/test-support@3.0.43
 - @appium/types@0.20.3
2024-06-11 13:02:33 -07:00
Corneliu Duplachi 9469aaef0e fix(logger): use index.d.ts for types instead of index.ts (#20247) 2024-06-11 21:18:52 +02:00
48 changed files with 3080 additions and 3384 deletions
+2585 -3265
View File
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -86,8 +86,8 @@
"@types/chai": "4.3.16",
"@types/chai-as-promised": "7.1.8",
"@types/diff": "5.2.1",
"@types/mocha": "10.0.6",
"@types/node": "20.14.2",
"@types/mocha": "10.0.7",
"@types/node": "20.14.9",
"@types/semver": "7.5.8",
"@types/sinon": "17.0.3",
"@types/sinon-chai": "3.2.12",
@@ -95,8 +95,8 @@
"@types/teen_process": "2.0.4",
"@types/ws": "8.5.10",
"@types/yargs": "17.0.32",
"@typescript-eslint/eslint-plugin": "7.13.0",
"@typescript-eslint/parser": "7.13.0",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"asyncbox": "3.0.0",
"chai": "4.4.1",
"chai-as-promised": "7.1.2",
@@ -113,13 +113,13 @@
"fancy-log": "2.0.0",
"finalhandler": "1.2.0",
"get-port": "5.1.1",
"json-schema-to-typescript": "14.0.5",
"lerna": "8.1.3",
"json-schema-to-typescript": "14.1.0",
"lerna": "8.1.5",
"log-symbols": "4.1.0",
"midnight-smoker": "8.0.0",
"mjpeg-consumer": "2.0.0",
"mjpeg-server": "0.3.1",
"mocha": "10.4.0",
"mocha": "10.5.2",
"mocha-chai-jest-snapshot": "1.1.4",
"npm-run-all2": "6.2.0",
"prettier": "3.3.2",
@@ -131,11 +131,11 @@
"sync-monorepo-packages": "1.0.2",
"through2": "4.0.2",
"ts-node": "10.9.2",
"tsd": "0.31.0",
"typescript": "5.4.5",
"tsd": "0.31.1",
"typescript": "5.5.2",
"validate.js": "0.13.1",
"webdriverio": "8.38.2",
"ws": "8.17.0",
"webdriverio": "8.39.0",
"ws": "8.17.1",
"yaml-js": "0.3.1"
},
"engines": {
+28
View File
@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.11.0](https://github.com/appium/appium/compare/appium@2.10.3...appium@2.11.0) (2024-06-27)
### Features
* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))
* **appium:** show extension update info message for newer major versions ([#20283](https://github.com/appium/appium/issues/20283)) ([f2c8b69](https://github.com/appium/appium/commit/f2c8b696085ba862553476f23509cac0674a447c))
* **appium:** show spinner during extension uninstall ([#20282](https://github.com/appium/appium/issues/20282)) ([f250793](https://github.com/appium/appium/commit/f25079354bfd646810813ae47244a1e2e962dbfb))
### Bug Fixes
* **appium:** update dependency ws to v8.17.1 ([d2b24da](https://github.com/appium/appium/commit/d2b24daba056373160d680ec5f017b28e9cbde1a))
* **execute-driver-plugin:** update dependency webdriverio to v8.39.0 ([faf9623](https://github.com/appium/appium/commit/faf9623a65868a6330d062076074da7c1c3acb2a))
* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))
* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [2.10.3](https://github.com/appium/appium/compare/appium@2.10.2...appium@2.10.3) (2024-06-11)
**Note:** Version bump only for package appium
## [2.10.2](https://github.com/appium/appium/compare/appium@2.10.1...appium@2.10.2) (2024-06-11)
**Note:** Version bump only for package appium
+1 -1
View File
@@ -47,7 +47,7 @@ another project called WebDriver) developed a relatively stable API for browser
Over the years, Selenium worked with various web browser vendors and the [W3C](https://w3c.org)
standards group to turn its API into an official web browser standard, called the [WebDriver
specification](https://w3c.github.io/webdriver/webdriver-spec.html). All the main browsers now
specification](https://w3c.github.io/webdriver/). All the main browsers now
implement automation capabilities inline with the WebDriver spec, without the Selenium team having
to maintain any software that performs actual automation; standards for the win!
+1 -1
View File
@@ -6,7 +6,7 @@ title: Intro to Appium Clients
---
For all the reasons discussed in the [main Overview](./appium.md), Appium is based on the [W3C
WebDriver specification](https://w3c.github.io/webdriver/webdriver-spec.html). This means that
WebDriver specification](https://w3c.github.io/webdriver/). This means that
Appium implements a client-server architecture. The server (consisting of Appium itself along with
any drivers or plugins you are using for automation) is connected to the devices under test, and
is actually responsible for making automation happen on those devices. The client (driven by *you*,
+2 -2
View File
@@ -37,7 +37,7 @@ their WebDriver protocol equivalents.
So let's say I wanted to do something with this empty driver; first I have to decide which
WebDriver command I want to implement. For our example, let's take the [Navigate
To](https://www.w3.org/TR/webdriver1/#navigate-to) WebDriver command. Leave aside for the moment
To](https://w3c.github.io/webdriver/#navigate-to) WebDriver command. Leave aside for the moment
what I want to have the driver *do* when this command is executed. To tell Appium the driver can
handle the command, all we have to do is define a method like this in our driver class:[^1]
@@ -96,7 +96,7 @@ a driver becomes the task of mapping the WebDriver protocol to this underlying A
a set of different underlying APIs--for example, the UiAutomator2 driver relies not only on the
[UiAutomator2](https://developer.android.com/training/testing/other-components/ui-automator)
technology from Google, but also functions only available through
[ADB](https://developer.android.com/studio/command-line/adb), as well as functions only available
[ADB](https://developer.android.com/tools/adb), as well as functions only available
via the Android SDK inside a helper app). Tying it all together into a single, usable, WebDriver
interface is the incredibly useful (but incredibly challenging) art of driver development!
+11 -2
View File
@@ -578,7 +578,9 @@ class ExtensionCliCommand {
return this.config.installedExtensions;
}
const pkgName = extRecord.pkgName;
await npm.uninstallPackage(this.config.appiumHome, pkgName);
await spinWith(this.isJsonOutput, `Uninstalling ${this.type} '${installSpec}'`, async () => {
await npm.uninstallPackage(this.config.appiumHome, pkgName);
});
await this.config.removeExtension(installSpec);
this.log.ok(`Successfully uninstalled ${this.type} '${installSpec}'`.green);
return this.config.installedExtensions;
@@ -639,9 +641,16 @@ class ExtensionCliCommand {
const updateVer = unsafe && update.unsafeUpdate ? update.unsafeUpdate : update.safeUpdate;
await spinWith(
this.isJsonOutput,
`Updating driver '${e}' from ${update.current} to ${updateVer}`,
`Updating ${this.type} '${e}' from ${update.current} to ${updateVer}`,
async () => await this.updateExtension(e, updateVer)
);
// if we're doing a safe update, but an unsafe update is also available, let the user know
if (!unsafe && update.unsafeUpdate) {
const newMajorUpdateMsg = `A newer major version ${update.unsafeUpdate} ` +
`is available for ${this.type} '${e}', which could include breaking changes. ` +
`If you want to apply this update, re-run with --unsafe`;
this.log.info(newMajorUpdateMsg.yellow);
}
updates[e] = {from: update.current, to: updateVer};
} catch (err) {
errors[e] = err;
+27 -14
View File
@@ -142,7 +142,7 @@ function createConsoleTransport(args, logLvl) {
format: format.combine(
formatTimestamp(args),
isLogColorEnabled(args) ? colorizeFormat : stripColorFormat,
format.printf(formatLogLine(args, true))
formatLog(args, true),
),
});
}
@@ -166,7 +166,7 @@ function createFileTransport(args, logLvl) {
format: format.combine(
stripColorFormat,
formatTimestamp(args),
format.printf(formatLogLine(args, false))
formatLog(args, false),
),
});
}
@@ -199,7 +199,7 @@ function createHttpTransport(args, logLvl) {
level: logLvl,
format: format.combine(
stripColorFormat,
format.printf(formatLogLine(args, false))
formatLog(args, false),
),
});
}
@@ -288,22 +288,35 @@ function colorizePrefix(text) {
/**
* @param {ParsedArgs} args
* @param {boolean} targetConsole
* @returns {(info: import('logform').TransformableInfo) => string}
* @returns {import('logform').Format}
*/
function formatLogLine(args, targetConsole) {
return (info) => {
if (['json', 'pretty_json'].includes(args.logFormat)) {
let infoCopy = {...info};
if (targetConsole && !args.logTimestamp) {
delete infoCopy.timestamp;
}
return JSON.stringify(infoCopy, null, args.logFormat === 'pretty_json' ? 2 : undefined);
}
function formatLog(args, targetConsole) {
if (['json', 'pretty_json'].includes(args.logFormat)) {
return format.combine(
format((info) => {
const infoCopy = {...info};
const contextInfo = globalLog.asyncStorage.getStore() ?? {};
if (targetConsole && !args.logTimestamp) {
delete infoCopy.timestamp;
}
if (!_.isEmpty(contextInfo)) {
infoCopy.context = {...contextInfo};
}
return infoCopy;
})(),
format.json({space: args.logFormat === 'pretty_json' ? 2 : undefined}),
);
}
return format.printf((info) => {
if (targetConsole) {
return `${args.logTimestamp ? `${info.timestamp} - ` : ''}${info.message}`;
}
return `${info.timestamp} ${info.message}`;
};
});
}
/**
+6 -2
View File
@@ -249,15 +249,19 @@ async function init(args) {
const {issues, rules} = await logger.unwrap().loadSecureValuesPreprocessingRules(
serverArgs.logFilters,
);
const argToLog = _.truncate(JSON.stringify(serverArgs.logFilters), {
length: 150
});
if (!_.isEmpty(issues)) {
throw new Error(
`The log filtering rules config '${serverArgs.logFilters}' has issues: ` +
`The log filtering rules config ${argToLog} has issues: ` +
JSON.stringify(issues, null, 2),
);
}
if (_.isEmpty(rules)) {
logger.warn(
`Found no log filtering rules in '${serverArgs.logFilters}'. Is that expected?`,
`Found no log filtering rules in the ${argToLog} config. ` +
`Is that expected?`,
);
} else {
// Filtering aims to "hide" these values from the log,
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "appium",
"version": "2.10.2",
"version": "2.11.0",
"description": "Automation for Apps.",
"keywords": [
"automation",
@@ -59,13 +59,13 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.10.2",
"@appium/base-plugin": "^2.2.38",
"@appium/docutils": "^1.0.14",
"@appium/logger": "^1.4.1",
"@appium/base-driver": "^9.11.0",
"@appium/base-plugin": "^2.2.40",
"@appium/docutils": "^1.0.16",
"@appium/logger": "^1.5.0",
"@appium/schema": "^0.6.1",
"@appium/support": "^5.0.2",
"@appium/types": "^0.20.2",
"@appium/support": "^5.1.0",
"@appium/types": "^0.21.0",
"@sidvind/better-ajv-errors": "2.1.3",
"@types/argparse": "2.0.16",
"@types/bluebird": "3.5.42",
@@ -89,11 +89,11 @@
"resolve-from": "5.0.0",
"semver": "7.6.2",
"source-map-support": "0.5.21",
"teen_process": "2.1.4",
"type-fest": "4.20.0",
"teen_process": "2.1.6",
"type-fest": "4.20.1",
"winston": "3.13.0",
"wrap-ansi": "7.0.0",
"ws": "8.17.0",
"ws": "8.17.1",
"yaml": "2.4.5"
},
"engines": {
@@ -1,5 +1,5 @@
{
"devDependencies": {
"webdriverio": "8.38.2"
"webdriverio": "8.39.0"
}
}
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [9.11.0](https://github.com/appium/appium/compare/@appium/base-driver@9.10.3...@appium/base-driver@9.11.0) (2024-06-27)
### Features
* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))
### Bug Fixes
* **base-driver:** Check if app path is relative earlier ([#20276](https://github.com/appium/appium/issues/20276)) ([2882e71](https://github.com/appium/appium/commit/2882e7163159b7918d54cc4521105a1fdf55da9a))
* **base-driver:** update dependency path-to-regexp to v7 ([#20279](https://github.com/appium/appium/issues/20279)) ([a746eef](https://github.com/appium/appium/commit/a746eefbbb627c7f7dd9d1ce13226a88d9527129))
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [9.10.3](https://github.com/appium/appium/compare/@appium/base-driver@9.10.2...@appium/base-driver@9.10.3) (2024-06-11)
**Note:** Version bump only for package @appium/base-driver
## [9.10.2](https://github.com/appium/appium/compare/@appium/base-driver@9.10.1...@appium/base-driver@9.10.2) (2024-06-11)
**Note:** Version bump only for package @appium/base-driver
@@ -20,6 +20,7 @@ import {
import B from 'bluebird';
import _ from 'lodash';
import {fixCaps, isW3cCaps} from '../helpers/capabilities';
import {calcSignature} from '../helpers/session';
import {DELETE_SESSION_COMMAND, determineProtocol, errors} from '../protocol';
import {processCapabilities, validateCaps} from './capabilities';
import {DriverCore} from './core';
@@ -309,6 +310,11 @@ export class BaseDriver<
this._log.prefix = helpers.generateDriverLogPrefix(this);
this.log.updateAsyncContext({
sessionId: this.sessionId,
sessionSignature: calcSignature(this.sessionId),
});
this.log.info(`Session created with session id: ${this.sessionId}`);
return [this.sessionId, caps] as CreateResult;
@@ -105,6 +105,14 @@ export async function configureApp(
};
const {protocol, pathname} = parseAppLink(app);
const isUrl = isSupportedUrl(app);
if (!isUrl && !path.isAbsolute(newApp)) {
newApp = path.resolve(process.cwd(), newApp);
logger.warn(
`The current application path '${app}' is not absolute ` +
`and has been rewritten to '${newApp}'. Consider using absolute paths rather than relative`
);
app = newApp;
}
const appCacheKey = toCacheKey(app);
const cachedAppInfo = APPLICATIONS_CACHE.get(appCacheKey);
@@ -276,13 +284,6 @@ export async function configureApp(
}
}
logger.info(`Unzipped local app to '${newApp}'`);
} else if (!path.isAbsolute(newApp)) {
newApp = path.resolve(process.cwd(), newApp);
logger.warn(
`The current application path '${app}' is not absolute ` +
`and has been rewritten to '${newApp}'. Consider using absolute paths rather than relative`
);
app = newApp;
}
const storeAppInCache = async (appPathToCache) => {
@@ -144,6 +144,9 @@ async function handleIdempotency(req, res, next) {
}
const key = _.isArray(keyOrArr) ? keyOrArr[0] : keyOrArr;
log.updateAsyncContext({idempotencyKey: key});
if (!MONITORED_METHODS.includes(req.method)) {
// GET, DELETE, etc. requests are idempotent by default
// there is no need to cache them
@@ -3,6 +3,8 @@ import log from './logger';
import {errors} from '../protocol';
export {handleIdempotency} from './idempotency';
import {pathToRegexp} from 'path-to-regexp';
import {util} from '@appium/support';
import {calcSignature} from '../helpers/session';
/**
*
@@ -76,15 +78,13 @@ export function fixPythonContentType(basePath) {
* @returns {any}
*/
export function handleLogContext(req, res, next) {
const contextStorage = global._global_npmlog?.asyncStorage;
if (!contextStorage) {
return next();
}
const requestId = util.uuidV4();
const sessionId = SESSION_ID_PATTERN.exec(req.url)?.[1];
const sessionInfo = sessionId ? {sessionId, sessionSignature: calcSignature(sessionId)} : {};
log.updateAsyncContext({requestId, ...sessionInfo}, true);
const sessionIdMatch = SESSION_ID_PATTERN.exec(req.url);
contextStorage.enterWith(
sessionIdMatch ? {sessionSignature: sessionIdMatch[1].substring(0, 8)} : {}
);
return next();
}
@@ -0,0 +1,8 @@
/**
* Extract the first 8 characters of session ID to prefix the log.
*
* @param sessionId session identifier
*/
export function calcSignature(sessionId: string): string {
return sessionId.substring(0, 8);
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-driver",
"version": "9.10.2",
"version": "9.11.0",
"description": "Base driver class for Appium drivers",
"keywords": [
"automation",
@@ -44,8 +44,8 @@
"test:types": "tsd"
},
"dependencies": {
"@appium/support": "^5.0.2",
"@appium/types": "^0.20.2",
"@appium/support": "^5.1.0",
"@appium/types": "^0.21.0",
"@colors/colors": "1.6.0",
"@types/async-lock": "1.4.2",
"@types/bluebird": "3.5.42",
@@ -64,10 +64,10 @@
"lru-cache": "10.2.2",
"method-override": "3.0.0",
"morgan": "1.10.0",
"path-to-regexp": "6.2.2",
"path-to-regexp": "7.0.0",
"serve-favicon": "2.5.0",
"source-map-support": "0.5.21",
"type-fest": "4.20.0",
"type-fest": "4.20.1",
"validate.js": "0.13.1"
},
"optionalDependencies": {
@@ -0,0 +1,19 @@
import {pathToRegexp} from 'path-to-regexp';
describe('middleware', function () {
describe('pathToRegexp', function () {
it('should match static path pattern', function () {
const pathname = '/ws/session/1234/appium/device/syslog';
const url = 'ws://127.0.0.1:8000/ws/session/1234/appium/device/syslog';
const currentPathname = new URL(url).pathname;
pathToRegexp(pathname).test(currentPathname).should.be.true;
});
it('should match dynamic path pattern', function () {
const pathname = '/ws/session/:sessionId/appium/device/syslog';
const url = 'ws://127.0.0.1:8000/ws/session/1234/appium/device/syslog';
const currentPathname = new URL(url).pathname;
pathToRegexp(pathname).test(currentPathname).should.be.true;
});
});
});
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.2.40](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.39...@appium/base-plugin@2.2.40) (2024-06-27)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.39](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.38...@appium/base-plugin@2.2.39) (2024-06-11)
**Note:** Version bump only for package @appium/base-plugin
## [2.2.38](https://github.com/appium/appium/compare/@appium/base-plugin@2.2.37...@appium/base-plugin@2.2.38) (2024-06-11)
**Note:** Version bump only for package @appium/base-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/base-plugin",
"version": "2.2.38",
"version": "2.2.40",
"description": "The base plugin used to create Appium 2.0 plugins",
"keywords": [
"automation",
@@ -40,8 +40,8 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-driver": "^9.10.2",
"@appium/support": "^5.0.2"
"@appium/base-driver": "^9.11.0",
"@appium/support": "^5.1.0"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.1.7](https://github.com/appium/appium/compare/@appium/doctor@2.1.6...@appium/doctor@2.1.7) (2024-06-27)
### Bug Fixes
* **doctor:** update dependency appium-adb to v12.4.3 ([4345a40](https://github.com/appium/appium/commit/4345a40a15d2473bb13524593ab66ff8ae3d8a7e))
* **doctor:** update dependency appium-adb to v12.4.4 ([15234bc](https://github.com/appium/appium/commit/15234bc05502157ebf847856d38e35da4d542df7))
* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))
* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))
## [2.1.6](https://github.com/appium/appium/compare/@appium/doctor@2.1.5...@appium/doctor@2.1.6) (2024-06-11)
**Note:** Version bump only for package @appium/doctor
## [2.1.5](https://github.com/appium/appium/compare/@appium/doctor@2.1.4...@appium/doctor@2.1.5) (2024-06-11)
**Note:** Version bump only for package @appium/doctor
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/doctor",
"version": "2.1.5",
"version": "2.1.7",
"description": "Test environment for fitness to run Appium",
"keywords": [
"automation",
@@ -44,16 +44,16 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/support": "^5.0.2",
"@appium/support": "^5.1.0",
"@colors/colors": "1.6.0",
"@types/bluebird": "3.5.42",
"@types/teen_process": "2.0.4",
"appium-adb": "12.4.2",
"appium-adb": "12.4.4",
"bluebird": "3.7.2",
"inquirer": "9.2.12",
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"teen_process": "2.1.4",
"teen_process": "2.1.6",
"yargs": "17.7.2"
},
"engines": {
+20
View File
@@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.16](https://github.com/appium/appium/compare/@appium/docutils@1.0.15...@appium/docutils@1.0.16) (2024-06-27)
### Bug Fixes
* **docutils:** update dependency typescript to v5.5.2 ([189bce8](https://github.com/appium/appium/commit/189bce88a09c4b3146c48bedf6e8c1dcb50c3a6d))
* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))
* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [1.0.15](https://github.com/appium/appium/compare/@appium/docutils@1.0.14...@appium/docutils@1.0.15) (2024-06-11)
**Note:** Version bump only for package @appium/docutils
## [1.0.14](https://github.com/appium/appium/compare/@appium/docutils@1.0.13...@appium/docutils@1.0.14) (2024-06-11)
**Note:** Version bump only for package @appium/docutils
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/docutils",
"version": "1.0.14",
"version": "1.0.16",
"description": "Documentation generation utilities for Appium and related projects",
"keywords": [
"automation",
@@ -48,7 +48,7 @@
"start": "node ./build/lib/cli/index.js"
},
"dependencies": {
"@appium/support": "^5.0.2",
"@appium/support": "^5.1.0",
"@appium/tsconfig": "^0.3.3",
"@sliphua/lilconfig-ts-loader": "3.2.2",
"@types/which": "3.0.4",
@@ -62,9 +62,9 @@
"read-pkg": "5.2.0",
"semver": "7.6.2",
"source-map-support": "0.5.21",
"teen_process": "2.1.4",
"type-fest": "4.20.0",
"typescript": "5.4.5",
"teen_process": "2.1.6",
"type-fest": "4.20.1",
"typescript": "5.5.2",
"yaml": "2.4.5",
"yargs": "17.7.2",
"yargs-parser": "21.1.1"
+2 -2
View File
@@ -1,5 +1,5 @@
mkdocs==1.6.0
mkdocs-git-revision-date-localized-plugin==1.2.6
mkdocs-material==9.5.26
mkdocs-material==9.5.27
mkdocs-redirects==1.2.1
mike==2.1.1
mike==2.1.2
+17
View File
@@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.6.4](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.3...@appium/driver-test-support@0.6.4) (2024-06-27)
### Bug Fixes
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [0.6.3](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.2...@appium/driver-test-support@0.6.3) (2024-06-11)
**Note:** Version bump only for package @appium/driver-test-support
## [0.6.2](https://github.com/appium/appium/compare/@appium/driver-test-support@0.6.1...@appium/driver-test-support@0.6.2) (2024-06-11)
**Note:** Version bump only for package @appium/driver-test-support
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/driver-test-support",
"version": "0.6.2",
"version": "0.6.4",
"description": "Test utilities for Appium drivers",
"keywords": [
"automation",
@@ -41,7 +41,7 @@
},
"types": "./build/lib/index.d.ts",
"dependencies": {
"@appium/types": "^0.20.2",
"@appium/types": "^0.21.0",
"@types/lodash": "4.17.5",
"@types/stoppable": "1.1.3",
"axios": "1.7.2",
@@ -52,7 +52,7 @@
"sinon": "18.0.0",
"source-map-support": "0.5.21",
"stoppable": "1.1.0",
"type-fest": "4.20.0"
"type-fest": "4.20.1"
},
"peerDependencies": {
"appium": "^2.0.0-beta.43",
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.31](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.30...@appium/execute-driver-plugin@3.0.31) (2024-06-27)
### Bug Fixes
* **execute-driver-plugin:** update dependency webdriverio to v8.39.0 ([faf9623](https://github.com/appium/appium/commit/faf9623a65868a6330d062076074da7c1c3acb2a))
## [3.0.30](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@3.0.29...@appium/execute-driver-plugin@3.0.30) (2024-06-06)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/execute-driver-plugin",
"version": "3.0.30",
"version": "3.0.31",
"description": "Plugin for batching and executing driver commands with Appiums",
"keywords": [
"automation",
@@ -43,7 +43,7 @@
"lodash": "4.17.21",
"source-map-support": "0.5.21",
"vm2": "3.9.19",
"webdriverio": "8.38.2"
"webdriverio": "8.39.0"
},
"peerDependencies": {
"appium": "^2.0.0-beta.35"
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.1.44](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.43...@appium/fake-plugin@3.1.44) (2024-06-27)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.43](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.42...@appium/fake-plugin@3.1.43) (2024-06-11)
**Note:** Version bump only for package @appium/fake-plugin
## [3.1.42](https://github.com/appium/appium/compare/@appium/fake-plugin@3.1.41...@appium/fake-plugin@3.1.42) (2024-06-11)
**Note:** Version bump only for package @appium/fake-plugin
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/fake-plugin",
"version": "3.1.42",
"version": "3.1.44",
"description": "A fake Appium 2.0 plugin",
"keywords": [
"automation",
@@ -39,8 +39,8 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/base-plugin": "^2.2.38",
"@appium/support": "^5.0.2",
"@appium/base-plugin": "^2.2.40",
"@appium/support": "^5.1.0",
"@types/bluebird": "3.5.42",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.15](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.14...@appium/images-plugin@3.0.15) (2024-06-27)
**Note:** Version bump only for package @appium/images-plugin
## [3.0.14](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.13...@appium/images-plugin@3.0.14) (2024-06-11)
**Note:** Version bump only for package @appium/images-plugin
## [3.0.13](https://github.com/appium/appium/compare/@appium/images-plugin@3.0.12...@appium/images-plugin@3.0.13) (2024-06-11)
**Note:** Version bump only for package @appium/images-plugin
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/images-plugin",
"version": "3.0.13",
"version": "3.0.15",
"description": "Plugin for working with images and image elements in Appium",
"keywords": [
"automation",
@@ -40,7 +40,7 @@
},
"dependencies": {
"@appium/opencv": "^3.0.4",
"@appium/support": "^5.0.2",
"@appium/support": "^5.1.0",
"lodash": "4.17.21",
"lru-cache": "10.2.2",
"sharp": "0.33.4",
+23
View File
@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.0](https://github.com/appium/appium/compare/@appium/logger@1.4.2...@appium/logger@1.5.0) (2024-06-27)
### Features
* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))
### Bug Fixes
* **logger:** Print an empty message if no arguments are provided ([#20284](https://github.com/appium/appium/issues/20284)) ([87fc50c](https://github.com/appium/appium/commit/87fc50c2aff523492a353f20fa9dc7e759be06b3))
## [1.4.2](https://github.com/appium/appium/compare/@appium/logger@1.4.1...@appium/logger@1.4.2) (2024-06-11)
### Bug Fixes
* **logger:** use `index.d.ts` for types instead of `index.ts` ([#20247](https://github.com/appium/appium/issues/20247)) ([9469aae](https://github.com/appium/appium/commit/9469aaef0e31d27b4814bc14763b0abeb6e11bf7))
## [1.4.1](https://github.com/appium/appium/compare/@appium/logger@1.4.0...@appium/logger@1.4.1) (2024-06-11)
+16 -1
View File
@@ -88,6 +88,19 @@ export class Log extends EventEmitter implements Logger {
return this._asyncStorage;
}
updateAsyncStorage(contextInfo: Record<string, any>, replace: boolean): void {
if (!_.isPlainObject(contextInfo)) {
return;
}
if (replace) {
this._asyncStorage.enterWith({...contextInfo});
} else {
const store = this._asyncStorage.getStore() ?? {};
Object.assign(store, contextInfo);
this._asyncStorage.enterWith(store);
}
}
enableColor(): void {
this._colorEnabled = true;
}
@@ -208,7 +221,9 @@ export class Log extends EventEmitter implements Logger {
if (stack) {
messageArguments.unshift(`${stack}\n`);
}
const formattedMessage: string = util.format(...messageArguments);
const formattedMessage: string = messageArguments.length
? util.format(...messageArguments)
: '';
const m: MessageObject = {
id: this._id++,
+2
View File
@@ -54,6 +54,8 @@ export interface Logger extends EventEmitter {
addLevel(level: string, n: number, style?: StyleObject, disp?: string): void;
updateAsyncStorage(contextInfo: Record<string, any>, replace: boolean): void;
get asyncStorage(): AsyncLocalStorage<Record<string, any>>;
// Allows for custom log levels
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/logger",
"version": "1.4.1",
"version": "1.5.0",
"author": "https://github.com/appium",
"description": "A Universal Logger For The Appium Ecosystem",
"repository": {
@@ -9,7 +9,7 @@
"directory": "packages/logger"
},
"main": "build/index.js",
"types": "index.ts",
"types": "build/index.d.ts",
"files": [
"index.ts",
"lib",
+18
View File
@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.3.39](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.38...@appium/plugin-test-support@0.3.39) (2024-06-27)
### Bug Fixes
* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))
* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))
## [0.3.38](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.37...@appium/plugin-test-support@0.3.38) (2024-06-11)
**Note:** Version bump only for package @appium/plugin-test-support
## [0.3.37](https://github.com/appium/appium/compare/@appium/plugin-test-support@0.3.36...@appium/plugin-test-support@0.3.37) (2024-06-11)
**Note:** Version bump only for package @appium/plugin-test-support
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/plugin-test-support",
"version": "0.3.37",
"version": "0.3.39",
"description": "Testing utilities for Appium plugins",
"keywords": [
"automation",
@@ -41,11 +41,11 @@
"test:unit": "exit 0"
},
"dependencies": {
"@appium/types": "^0.20.2",
"@appium/types": "^0.21.0",
"get-port": "5.1.1",
"log-symbols": "4.1.0",
"source-map-support": "0.5.21",
"teen_process": "2.1.4"
"teen_process": "2.1.6"
},
"peerDependencies": {
"appium": "^2.0.0-beta.43",
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [5.1.0](https://github.com/appium/appium/compare/@appium/support@5.0.3...@appium/support@5.1.0) (2024-06-27)
### Features
* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))
### Bug Fixes
* **support:** update dependency @types/uuid to v10 ([#20280](https://github.com/appium/appium/issues/20280)) ([073447a](https://github.com/appium/appium/commit/073447ae4a69f82c284b17d122916746620d4fdf))
* **support:** update dependency glob to v10.4.2 ([#20268](https://github.com/appium/appium/issues/20268)) ([d5e5186](https://github.com/appium/appium/commit/d5e5186cb7612b64634c98f21532f354f411bbb8))
* **support:** update dependency teen_process to v2.1.5 ([bc388db](https://github.com/appium/appium/commit/bc388db1116f411f4b241105f5feae30418c9a27))
* **support:** update dependency teen_process to v2.1.6 ([5412461](https://github.com/appium/appium/commit/541246184dc7521c825ec1902775e681ea6f0db3))
* **support:** update dependency uuid to v10 ([#20236](https://github.com/appium/appium/issues/20236)) ([57bbb7f](https://github.com/appium/appium/commit/57bbb7f46db2aa0f16bce31c525286a6a94faf25))
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [5.0.3](https://github.com/appium/appium/compare/@appium/support@5.0.2...@appium/support@5.0.3) (2024-06-11)
**Note:** Version bump only for package @appium/support
## [5.0.2](https://github.com/appium/appium/compare/@appium/support@5.0.1...@appium/support@5.0.2) (2024-06-11)
**Note:** Version bump only for package @appium/support
+6 -12
View File
@@ -35,26 +35,20 @@ export function getLogger(prefix = null) {
unwrap: () => logger,
levels: LEVELS,
prefix,
/**
* Logs given arguments at the error level and returns
* the error object.
*
* @param {...any} args
* @returns {Error}
*/
errorWithException (/** @type {any[]} */ ...args) {
this.error(...args);
// make sure we have an `Error` object. Wrap if necessary
return _.isError(args[0]) ? args[0] : new Error(args.join('\n'));
},
/**
* @deprecated Use {@link errorWithException} instead
* @param {...any} args
* @throws {Error}
*/
errorAndThrow (/** @type {any[]} */ ...args) {
throw this.errorWithException(args);
},
updateAsyncContext(
/** @type {import('@appium/types').AppiumLoggerContext} */ contextInfo,
replace = false,
) {
this.unwrap().updateAsyncStorage(contextInfo, replace);
},
};
// allow access to the level of the underlying logger
Object.defineProperty(wrappedLogger, 'level', {
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/support",
"version": "5.0.2",
"version": "5.1.0",
"description": "Support libs used across appium packages",
"keywords": [
"automation",
@@ -41,9 +41,9 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/logger": "^1.4.1",
"@appium/logger": "^1.5.0",
"@appium/tsconfig": "^0.3.3",
"@appium/types": "^0.20.2",
"@appium/types": "^0.21.0",
"@colors/colors": "1.6.0",
"@types/archiver": "6.0.2",
"@types/base64-stream": "1.0.5",
@@ -58,7 +58,7 @@
"@types/shell-quote": "1.7.5",
"@types/supports-color": "8.1.3",
"@types/teen_process": "2.0.4",
"@types/uuid": "9.0.8",
"@types/uuid": "10.0.0",
"@types/which": "3.0.4",
"archiver": "7.0.1",
"axios": "1.7.2",
@@ -68,7 +68,7 @@
"bplist-parser": "0.3.2",
"form-data": "4.0.0",
"get-stream": "6.0.1",
"glob": "10.4.1",
"glob": "10.4.2",
"jsftp": "2.1.3",
"klaw": "4.1.0",
"lockfile": "1.0.4",
@@ -88,9 +88,9 @@
"shell-quote": "1.8.1",
"source-map-support": "0.5.21",
"supports-color": "8.1.1",
"teen_process": "2.1.4",
"type-fest": "4.20.0",
"uuid": "9.0.1",
"teen_process": "2.1.6",
"type-fest": "4.20.1",
"uuid": "10.0.0",
"which": "4.0.0",
"yauzl": "3.1.3"
},
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.0.44](https://github.com/appium/appium/compare/@appium/test-support@3.0.43...@appium/test-support@3.0.44) (2024-06-27)
**Note:** Version bump only for package @appium/test-support
## [3.0.43](https://github.com/appium/appium/compare/@appium/test-support@3.0.42...@appium/test-support@3.0.43) (2024-06-11)
**Note:** Version bump only for package @appium/test-support
## [3.0.42](https://github.com/appium/appium/compare/@appium/test-support@3.0.41...@appium/test-support@3.0.42) (2024-06-11)
**Note:** Version bump only for package @appium/test-support
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/test-support",
"version": "3.0.42",
"version": "3.0.44",
"description": "A collection of test utilities used across Appium packages",
"keywords": [
"automation",
@@ -45,7 +45,7 @@
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
},
"dependencies": {
"@appium/support": "^5.0.2",
"@appium/support": "^5.1.0",
"@colors/colors": "1.6.0",
"bluebird": "3.7.2",
"lodash": "4.17.21",
+22
View File
@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.21.0](https://github.com/appium/appium/compare/@appium/types@0.20.3...@appium/types@0.21.0) (2024-06-27)
### Features
* **appium:** Improve context logging ([#20250](https://github.com/appium/appium/issues/20250)) ([f675abc](https://github.com/appium/appium/commit/f675abc27b3e6beac2431cc71afb5fc2c2f70534))
### Bug Fixes
* **types:** update dependency type-fest to v4.20.1 ([#20255](https://github.com/appium/appium/issues/20255)) ([1984553](https://github.com/appium/appium/commit/19845531f558e2b16dfae807c768e1b9f2cab25d))
## [0.20.3](https://github.com/appium/appium/compare/@appium/types@0.20.2...@appium/types@0.20.3) (2024-06-11)
**Note:** Version bump only for package @appium/types
## [0.20.2](https://github.com/appium/appium/compare/@appium/types@0.20.1...@appium/types@0.20.2) (2024-06-11)
**Note:** Version bump only for package @appium/types
+30
View File
@@ -12,6 +12,20 @@ export type AppiumLoggerPrefix = string | (() => string);
*/
export type AppiumLoggerLevel = 'silly' | 'verbose' | 'debug' | 'info' | 'http' | 'warn' | 'error';
/**
* Async Context information to be stored in AsyncLocalStorage.
* Only the sessionSignature value is used as the prefix of the log message,
* and the remaining values are recorded only in JSON format logs.
*/
export type AppiumLoggerContext = {
idempotencyKey?: string;
requestId?: string;
sessionId?: string;
sessionSignature?: string;
[key: string]: any
}
/**
* Describes the internal logger.
*/
@@ -36,7 +50,23 @@ export interface AppiumLogger {
http(...args: any[]): void;
/**
* @deprecated Use {@link errorWithException} instead
* @param {...any} args
* @throws {Error}
*/
errorAndThrow(...args: any[]): never;
/**
* Logs given arguments at the error level and returns
* the error object.
*
* @param {...any} args
* @returns {Error}
*/
errorWithException(...args: any[]): Error;
/**
* Assign context values to be used in the entire current asynchronous context for logging.
*
* @param {AppiumLoggerContext} contextInfo key-value pairs to be added to the context
* @param {boolean} [replace=false] if true, replace the existing context info object(default: false)
*/
updateAsyncContext(contextInfo: AppiumLoggerContext, replace?: boolean): void;
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@appium/types",
"version": "0.20.2",
"version": "0.21.0",
"description": "Various type declarations used across Appium",
"keywords": [
"automation",
@@ -38,12 +38,12 @@
"test:types": "tsd"
},
"dependencies": {
"@appium/logger": "^1.4.1",
"@appium/logger": "^1.5.0",
"@appium/schema": "^0.6.1",
"@appium/tsconfig": "^0.3.3",
"@types/express": "4.17.21",
"@types/ws": "8.5.10",
"type-fest": "4.20.0"
"type-fest": "4.20.1"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0",