You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

appium

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium - npm Package Compare versions

Comparing version

to
2.11.0

@@ -12,25 +12,21 @@ /**

}
export type DriverData = import('@appium/types').DriverData;
export type DriverOpts = import('@appium/types').ServerArgs;
export type Constraints = import('@appium/types').Constraints;
export type AppiumServer = import('@appium/types').AppiumServer;
export type ExtensionType = import('@appium/types').ExtensionType;
export type DriverConfig = import('./extension/driver-config').DriverConfig;
export type PluginType = import('@appium/types').PluginType;
export type DriverType = import('@appium/types').DriverType;
export type StringRecord = import('@appium/types').StringRecord;
export type ExternalDriver = import('@appium/types').ExternalDriver;
export type PluginClass = import('@appium/types').PluginClass;
export type Plugin = import('@appium/types').Plugin;
export type DriverClass = import('@appium/types').DriverClass<import('@appium/types').Driver>;
export type AppiumSessionHandler = import('@appium/types').ISessionHandler<AppiumDriverConstraints, SessionHandlerCreateResult, SessionHandlerDeleteResult>;
export type SessionHandlerCreateResult = SessionHandlerResult<[
innerSessionId: string,
caps: import('@appium/types').DriverCaps<Constraints>,
protocol: string | undefined
]>;
export type Core<C extends import("@appium/types").Constraints> = import('@appium/types').Core<C>;
export type DriverData = import("@appium/types").DriverData;
export type DriverOpts = import("@appium/types").ServerArgs;
export type Constraints = import("@appium/types").Constraints;
export type AppiumServer = import("@appium/types").AppiumServer;
export type ExtensionType = import("@appium/types").ExtensionType;
export type DriverConfig = import("./extension/driver-config").DriverConfig;
export type PluginType = import("@appium/types").PluginType;
export type DriverType = import("@appium/types").DriverType;
export type StringRecord = import("@appium/types").StringRecord;
export type ExternalDriver = import("@appium/types").ExternalDriver;
export type PluginClass = import("@appium/types").PluginClass;
export type Plugin = import("@appium/types").Plugin;
export type DriverClass = import("@appium/types").DriverClass<import("@appium/types").Driver>;
export type AppiumSessionHandler = import("@appium/types").ISessionHandler<AppiumDriverConstraints, SessionHandlerCreateResult, SessionHandlerDeleteResult>;
export type SessionHandlerCreateResult = SessionHandlerResult<[innerSessionId: string, caps: import("@appium/types").DriverCaps<Constraints>, protocol: string | undefined]>;
export type Core<C extends Constraints> = import("@appium/types").Core<C>;
export type SessionHandlerDeleteResult = SessionHandlerResult<void>;
/**
* Used by {@linkcode AppiumDriver.createSession } and {@linkcode AppiumDriver.deleteSession } to describe
* Used by {@linkcode AppiumDriver.createSession} and {@linkcode AppiumDriver.deleteSession} to describe
* result.

@@ -44,3 +40,3 @@ */

export type AppiumDriverConstraints = typeof desiredCapabilityConstraints;
export type W3CAppiumDriverCaps = import('@appium/types').W3CDriverCaps<AppiumDriverConstraints>;
export type W3CAppiumDriverCaps = import("@appium/types").W3CDriverCaps<AppiumDriverConstraints>;
/**

@@ -62,3 +58,3 @@ * @extends {DriverCore<AppiumDriverConstraints>}

*/
constructor(opts: import('@appium/types').DriverOpts<AppiumDriverConstraints>);
constructor(opts: import("@appium/types").DriverOpts<AppiumDriverConstraints>);
/**

@@ -98,5 +94,5 @@ * Access to sessions list must be guarded with a Semaphore, because

/** @type {Record<string, import('ws').WebSocket[]>} */
bidiSockets: Record<string, import('ws').WebSocket[]>;
bidiSockets: Record<string, import("ws").WebSocket[]>;
/** @type {Record<string, import('ws').WebSocket>} */
bidiProxyClients: Record<string, import('ws').WebSocket>;
bidiProxyClients: Record<string, import("ws").WebSocket>;
/**

@@ -108,3 +104,3 @@ * @type {AppiumDriverConstraints}

/** @type {import('@appium/types').DriverOpts<AppiumDriverConstraints>} */
args: import('@appium/types').DriverOpts<AppiumDriverConstraints>;
args: import("@appium/types").DriverOpts<AppiumDriverConstraints>;
_isShuttingDown: boolean;

@@ -148,3 +144,3 @@ sessionExists(sessionId: any): boolean;

*/
onBidiConnection(ws: import('ws').WebSocket, req: import('http').IncomingMessage): void;
onBidiConnection(ws: import("ws").WebSocket, req: import("http").IncomingMessage): void;
/**

@@ -155,3 +151,3 @@ * Initialize a new bidi connection

*/
initBidiSocket(ws: import('ws').WebSocket, req: import('http').IncomingMessage): {
initBidiSocket(ws: import("ws").WebSocket, req: import("http").IncomingMessage): {
bidiHandlerDriver: AppiumDriver | import("@appium/types").ExternalDriver<import("@appium/types").Constraints, string, import("@appium/types").StringRecord, import("@appium/types").StringRecord, import("@appium/types").DefaultCreateSessionResult<import("@appium/types").Constraints>, void, import("@appium/types").StringRecord>;

@@ -172,3 +168,3 @@ proxyClient: WebSocket.WebSocket | null;

*/
initBidiProxyHandlers(proxyClient: import('ws').WebSocket | null, ws: import('ws').WebSocket, send: (data: string | Buffer) => Promise<void>): void;
initBidiProxyHandlers(proxyClient: import("ws").WebSocket | null, ws: import("ws").WebSocket, send: (data: string | Buffer) => Promise<void>): void;
/**

@@ -188,3 +184,3 @@ * Set up handlers on the bidi socket connection to the client

*/
initBidiSocketHandlers(ws: import('ws').WebSocket, proxyClient: import('ws').WebSocket | null, send: (data: string | Buffer) => Promise<void>, sendToProxy: ((data: string | Buffer) => Promise<void>) | null, bidiHandlerDriver: import('@appium/types').ExternalDriver | AppiumDriver, logSocketErr: (err: Error) => void): void;
initBidiSocketHandlers(ws: import("ws").WebSocket, proxyClient: import("ws").WebSocket | null, send: (data: string | Buffer) => Promise<void>, sendToProxy: ((data: string | Buffer) => Promise<void>) | null, bidiHandlerDriver: import("@appium/types").ExternalDriver | AppiumDriver, logSocketErr: (err: Error) => void): void;
/**

@@ -199,3 +195,3 @@ * Set up bidi event listeners

*/
initBidiEventListeners(ws: import('ws').WebSocket, bidiHandlerDriver: import('@appium/types').ExternalDriver | AppiumDriver, send: (data: string | Buffer) => Promise<void>): void;
initBidiEventListeners(ws: import("ws").WebSocket, bidiHandlerDriver: import("@appium/types").ExternalDriver | AppiumDriver, send: (data: string | Buffer) => Promise<void>): void;
/**

@@ -283,3 +279,3 @@ * @param {Buffer} data

protocol: string;
} | import('type-fest').AsyncReturnType<ExternalDriver['executeCommand']>>;
} | import("type-fest").AsyncReturnType<ExternalDriver["executeCommand"]>>;
wrapCommandWithPlugins({ driver, cmd, args, next, cmdHandledBy, plugins }: {

@@ -286,0 +282,0 @@ driver: any;

@@ -1,6 +0,6 @@

export type ExtensionType = import('@appium/types').ExtensionType;
export type ExtensionType = import("@appium/types").ExtensionType;
/**
* A tuple of argument aliases and argument options
*/
export type ArgumentDefinitions = Map<[name: string] | [name: string, alias: string], import('argparse').ArgumentOptions>;
export type ArgumentDefinitions = Map<[name: string] | [name: string, alias: string], import("argparse").ArgumentOptions>;
/**

@@ -15,4 +15,4 @@ * Derives the options for the `server` command from the schema, and adds the arguments

*/
export const getExtensionArgs: (() => Record<import("@appium/types").ExtensionType, Record<import("appium/types").CliExtensionSubcommand, ArgumentDefinitions>>) & _.MemoizedFunction;
export const getExtensionArgs: (() => Record<ExtensionType, Record<import("appium/types").CliExtensionSubcommand, ArgumentDefinitions>>) & _.MemoizedFunction;
import _ from 'lodash';
//# sourceMappingURL=args.d.ts.map

@@ -6,3 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getExtensionArgs = exports.getServerArgs = void 0;
exports.getExtensionArgs = void 0;
exports.getServerArgs = getServerArgs;
const lodash_1 = __importDefault(require("lodash"));

@@ -244,3 +245,2 @@ const constants_1 = require("../constants");

}
exports.getServerArgs = getServerArgs;
/**

@@ -247,0 +247,0 @@ * These don't make sense in the context of a config file for obvious reasons.

@@ -8,3 +8,3 @@ /**

*/
constructor({ config, json }: import('./extension-command').ExtensionCommandOptions<DriverType>);
constructor({ config, json }: import("./extension-command").ExtensionCommandOptions<DriverType>);
/**

@@ -30,3 +30,3 @@ * Install a driver

*/
update({ driver, unsafe }: DriverUpdateOpts): Promise<import('./extension-command').ExtensionUpdateResult>;
update({ driver, unsafe }: DriverUpdateOpts): Promise<import("./extension-command").ExtensionUpdateResult>;
/**

@@ -37,3 +37,3 @@ *

*/
run({ driver, scriptName, extraArgs }: DriverRunOptions): Promise<import('./extension-command').RunOutput>;
run({ driver, scriptName, extraArgs }: DriverRunOptions): Promise<import("./extension-command").RunOutput>;
/**

@@ -48,11 +48,11 @@ * Runs doctor checks for the given driver.

}
export type ExtensionType = import('@appium/types').ExtensionType;
export type DriverType = import('@appium/types').DriverType;
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
export type ExtensionType = import("@appium/types").ExtensionType;
export type DriverType = import("@appium/types").DriverType;
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
export type DriverCommandOptions = {
config: import('../extension/extension-config').ExtensionConfig<DriverType>;
config: import("../extension/extension-config").ExtensionConfig<DriverType>;
json: boolean;
};
/**
* Options for {@linkcode DriverCliCommand.install }
* Options for {@linkcode DriverCliCommand.install}
*/

@@ -73,5 +73,5 @@ export type DriverInstallOpts = {

};
export type InstallType = import('appium/types').InstallType;
export type InstallType = import("appium/types").InstallType;
/**
* Options for {@linkcode DriverCliCommand.uninstall }
* Options for {@linkcode DriverCliCommand.uninstall}
*/

@@ -85,3 +85,3 @@ export type DriverUninstallOpts = {

/**
* Options for {@linkcode DriverCliCommand.update }
* Options for {@linkcode DriverCliCommand.update}
*/

@@ -99,3 +99,3 @@ export type DriverUpdateOpts = {

/**
* Options for {@linkcode DriverCliCommand.run }.
* Options for {@linkcode DriverCliCommand.run}.
*/

@@ -117,3 +117,3 @@ export type DriverRunOptions = {

/**
* Options for {@linkcode DriverCliCommand.doctor }.
* Options for {@linkcode DriverCliCommand.doctor}.
*/

@@ -120,0 +120,0 @@ export type DriverDoctorOptions = {

export default ExtensionCliCommand;
export { ExtensionCliCommand as ExtensionCommand };
/**
* Options for the {@linkcode ExtensionCliCommand } constructor
* Options for the {@linkcode ExtensionCliCommand} constructor
*/
export type ExtensionCommandOptions<ExtType extends import("@appium/types").ExtensionType> = {
export type ExtensionCommandOptions<ExtType extends ExtensionType> = {
/**

@@ -17,3 +17,3 @@ * - the `DriverConfig` or `PluginConfig` instance used for this command

/**
* Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list }.
* Extra stuff about extensions; used indirectly by {@linkcode ExtensionCliCommand.list}.
*/

@@ -46,22 +46,22 @@ export type ExtensionListMetadata = {

};
export type ExtensionType = import('@appium/types').ExtensionType;
export type DriverType = import('@appium/types').DriverType;
export type PluginType = import('@appium/types').PluginType;
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
export type ExtensionConfig<ExtType extends import("@appium/types").ExtensionType> = import('../extension/extension-config').ExtensionConfig<ExtType>;
export type ExtMetadata<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtMetadata<ExtType>;
export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
export type ExtPackageJson<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtPackageJson<ExtType>;
export type ExtInstallReceipt<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtInstallReceipt<ExtType>;
export type ExtensionType = import("@appium/types").ExtensionType;
export type DriverType = import("@appium/types").DriverType;
export type PluginType = import("@appium/types").PluginType;
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
export type ExtensionConfig<ExtType extends ExtensionType> = import("../extension/extension-config").ExtensionConfig<ExtType>;
export type ExtMetadata<ExtType extends ExtensionType> = import("appium/types").ExtMetadata<ExtType>;
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
export type ExtPackageJson<ExtType extends ExtensionType> = import("appium/types").ExtPackageJson<ExtType>;
export type ExtInstallReceipt<ExtType extends ExtensionType> = import("appium/types").ExtInstallReceipt<ExtType>;
/**
* Possible return value for {@linkcode ExtensionCliCommand.list }
* Possible return value for {@linkcode ExtensionCliCommand.list}
*/
export type ExtensionListData<ExtType extends import("@appium/types").ExtensionType> = Partial<ExtManifest<ExtType>> & Partial<ExtensionListMetadata>;
export type InstalledExtensionListData<ExtType extends import("@appium/types").ExtensionType> = ExtManifest<ExtType> & ExtensionListMetadata;
export type ExtensionListData<ExtType extends ExtensionType> = Partial<ExtManifest<ExtType>> & Partial<ExtensionListMetadata>;
export type InstalledExtensionListData<ExtType extends ExtensionType> = ExtManifest<ExtType> & ExtensionListMetadata;
/**
* Return value of {@linkcode ExtensionCliCommand.list }.
* Return value of {@linkcode ExtensionCliCommand.list}.
*/
export type ExtensionList<ExtType extends import("@appium/types").ExtensionType> = Record<string, ExtensionListData<ExtType>>;
export type ExtensionList<ExtType extends ExtensionType> = Record<string, ExtensionListData<ExtType>>;
/**
* Options for {@linkcode ExtensionCliCommand._run }.
* Options for {@linkcode ExtensionCliCommand._run}.
*/

@@ -88,3 +88,3 @@ export type RunOptions = {

/**
* Options for {@linkcode ExtensionCliCommand.doctor }.
* Options for {@linkcode ExtensionCliCommand.doctor}.
*/

@@ -98,3 +98,3 @@ export type DoctorOptions = {

/**
* Return value of {@linkcode ExtensionCliCommand._run }
* Return value of {@linkcode ExtensionCliCommand._run}
*/

@@ -107,3 +107,3 @@ export type RunOutput = {

/**
* - script output if `bufferOutput` was `true` in {@linkcode RunOptions }
* - script output if `bufferOutput` was `true` in {@linkcode RunOptions}
*/

@@ -113,3 +113,3 @@ output?: string[] | undefined;

/**
* Options for {@linkcode ExtensionCliCommand._update }.
* Options for {@linkcode ExtensionCliCommand._update}.
*/

@@ -127,3 +127,3 @@ export type ExtensionUpdateOpts = {

/**
* Return value of {@linkcode ExtensionCliCommand._update }.
* Return value of {@linkcode ExtensionCliCommand._update}.
*/

@@ -136,3 +136,3 @@ export type ExtensionUpdateResult = {

/**
* - map of ext names to {@linkcode UpdateReport }s
* - map of ext names to {@linkcode UpdateReport}s
*/

@@ -142,3 +142,3 @@ updates: Record<string, UpdateReport>;

/**
* Part of result of {@linkcode ExtensionCliCommand._update }.
* Part of result of {@linkcode ExtensionCliCommand._update}.
*/

@@ -156,3 +156,3 @@ export type UpdateReport = {

/**
* Options for {@linkcode ExtensionCliCommand._uninstall }.
* Options for {@linkcode ExtensionCliCommand._uninstall}.
*/

@@ -166,3 +166,3 @@ export type UninstallOpts = {

/**
* Used by {@linkcode ExtensionCliCommand.getPostInstallText }
* Used by {@linkcode ExtensionCliCommand.getPostInstallText}
*/

@@ -180,3 +180,3 @@ export type ExtensionArgs = {

/**
* Options for {@linkcode ExtensionCliCommand.installViaNpm }
* Options for {@linkcode ExtensionCliCommand.installViaNpm}
*/

@@ -195,3 +195,3 @@ export type InstallViaNpmArgs = {

*/
installType: import('appium/types').InstallType;
installType: import("appium/types").InstallType;
/**

@@ -203,3 +203,3 @@ * - the specific version of the NPM package

/**
* Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate }
* Object returned by {@linkcode ExtensionCliCommand.checkForExtensionUpdate}
*/

@@ -221,3 +221,3 @@ export type PossibleUpdates = {

/**
* Options for {@linkcode ExtensionCliCommand._install }
* Options for {@linkcode ExtensionCliCommand._install}
*/

@@ -238,3 +238,3 @@ export type InstallOpts = {

};
export type KnownExtensions<ExtType extends import("@appium/types").ExtensionType> = ExtType extends DriverType ? typeof import('../constants').KNOWN_DRIVERS : ExtType extends PluginType ? typeof import('../constants').KNOWN_PLUGINS : never;
export type KnownExtensions<ExtType extends ExtensionType> = ExtType extends DriverType ? typeof import("../constants").KNOWN_DRIVERS : ExtType extends PluginType ? typeof import("../constants").KNOWN_PLUGINS : never;
export type ListOptions = {

@@ -255,5 +255,5 @@ /**

/**
* Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt }
* Opts for {@linkcode ExtensionCliCommand.getInstallationReceipt}
*/
export type GetInstallationReceiptOpts<ExtType extends import("@appium/types").ExtensionType> = {
export type GetInstallationReceiptOpts<ExtType extends ExtensionType> = {
installPath: string;

@@ -264,7 +264,7 @@ installSpec: string;

};
export type InstallType = import('appium/types').InstallType;
export type InstallType = import("appium/types").InstallType;
/**
* @template {ExtensionType} ExtType
*/
declare class ExtensionCliCommand<ExtType extends import("@appium/types").ExtensionType> {
declare class ExtensionCliCommand<ExtType extends ExtensionType> {
/**

@@ -319,3 +319,3 @@ * Build an ExtensionCommand

*/
list<ExtType_1 extends import("@appium/types").ExtensionType>({ showInstalled, showUpdates, verbose }: ListOptions): Promise<ExtensionList<ExtType_1>>;
list<ExtType_1 extends ExtensionType>({ showInstalled, showUpdates, verbose }: ListOptions): Promise<ExtensionList<ExtType_1>>;
/**

@@ -369,3 +369,3 @@ * Checks whether the given extension is compatible with the currently installed server

*/
validatePackageJson(pkg: import('type-fest').PackageJson, installSpec: string): pkg is ExtPackageJson<ExtType>;
validatePackageJson(pkg: import("type-fest").PackageJson, installSpec: string): pkg is ExtPackageJson<ExtType>;
/**

@@ -424,3 +424,3 @@ * For any `package.json` fields which a particular type of extension requires, validate the

*/
_runUnbuffered(cwd: string, script: string, args?: string[], opts?: import('child_process').SpawnOptions): import('node:child_process').ChildProcess;
_runUnbuffered(cwd: string, script: string, args?: string[], opts?: import("child_process").SpawnOptions): import("node:child_process").ChildProcess;
/**

@@ -427,0 +427,0 @@ * Runs doctor checks for the given extension.

@@ -494,3 +494,5 @@ "use strict";

const pkgName = extRecord.pkgName;
await support_1.npm.uninstallPackage(this.config.appiumHome, pkgName);
await (0, utils_1.spinWith)(this.isJsonOutput, `Uninstalling ${this.type} '${installSpec}'`, async () => {
await support_1.npm.uninstallPackage(this.config.appiumHome, pkgName);
});
await this.config.removeExtension(installSpec);

@@ -542,3 +544,10 @@ this.log.ok(`Successfully uninstalled ${this.type} '${installSpec}'`.green);

const updateVer = unsafe && update.unsafeUpdate ? update.unsafeUpdate : update.safeUpdate;
await (0, utils_1.spinWith)(this.isJsonOutput, `Updating driver '${e}' from ${update.current} to ${updateVer}`, async () => await this.updateExtension(e, updateVer));
await (0, utils_1.spinWith)(this.isJsonOutput, `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 };

@@ -545,0 +554,0 @@ }

@@ -5,7 +5,7 @@ export const commandClasses: Readonly<{

}>;
export type ExtCommand<ExtType extends import("@appium/types").ExtensionType> = ExtType extends DriverType ? Class<DriverCliCommand> : ExtType extends PluginType ? Class<PluginCliCommand> : never;
export type ExtensionType = import('@appium/types').ExtensionType;
export type DriverType = import('@appium/types').DriverType;
export type PluginType = import('@appium/types').PluginType;
export type Class<T> = import('@appium/types').Class<T>;
export type ExtCommand<ExtType extends ExtensionType> = ExtType extends DriverType ? Class<DriverCliCommand> : ExtType extends PluginType ? Class<PluginCliCommand> : never;
export type ExtensionType = import("@appium/types").ExtensionType;
export type DriverType = import("@appium/types").DriverType;
export type PluginType = import("@appium/types").PluginType;
export type Class<T> = import("@appium/types").Class<T>;
import DriverCliCommand from './driver-command';

@@ -12,0 +12,0 @@ import PluginCliCommand from './plugin-command';

@@ -6,3 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.runExtensionCommand = exports.commandClasses = void 0;
exports.commandClasses = void 0;
exports.runExtensionCommand = runExtensionCommand;
/* eslint-disable no-console */

@@ -60,3 +61,2 @@ const constants_1 = require("../constants");

}
exports.runExtensionCommand = runExtensionCommand;
/**

@@ -63,0 +63,0 @@ * @template {ExtensionType} ExtType

export const EXTRA_ARGS: "extraArgs";
export type DriverType = import('@appium/types').DriverType;
export type PluginType = import('@appium/types').PluginType;
export type DriverType = import("@appium/types").DriverType;
export type PluginType = import("@appium/types").PluginType;
/**

@@ -41,3 +41,3 @@ * Creates a {@link ArgParser} instance; finalizes the config schema.

*/
static _addServerToParser(subParser: import('argparse').SubParser): import('./args').ArgumentDefinitions;
static _addServerToParser(subParser: import("argparse").SubParser): import("./args").ArgumentDefinitions;
/**

@@ -47,3 +47,3 @@ * Adds extension sub-sub-commands to `driver`/`plugin` subcommands

*/
static _addExtensionCommandsToParser(subParsers: import('argparse').SubParser): void;
static _addExtensionCommandsToParser(subParsers: import("argparse").SubParser): void;
/**

@@ -53,3 +53,3 @@ * Add subcommand and sub-sub commands for 'setup' subcommand.

*/
static _addSetupToParser(subParser: import('argparse').SubParser): void;
static _addSetupToParser(subParser: import("argparse").SubParser): void;
/**

@@ -78,3 +78,3 @@ * @param {boolean} [debug] - If true, throw instead of exit on error.

*/
parse_args: ArgParser['parseArgs'];
parse_args: ArgParser["parseArgs"];
/**

@@ -90,5 +90,5 @@ * Parse arguments from the command line.

*/
parseArgs<Cmd extends import("appium/types").CliCommand = "server">(args?: string[] | undefined): import("appium/types").Args<Cmd, void>;
parseArgs<Cmd extends import("appium/types").CliCommand = "server">(args?: string[] | undefined): import("appium/types").Args<Cmd>;
}
import { ArgumentParser } from 'argparse';
//# sourceMappingURL=parser.d.ts.map

@@ -6,3 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ArgParser = exports.getParser = exports.EXTRA_ARGS = void 0;
exports.ArgParser = exports.EXTRA_ARGS = void 0;
exports.getParser = getParser;
const support_1 = require("@appium/support");

@@ -296,3 +297,2 @@ const argparse_1 = require("argparse");

}
exports.getParser = getParser;
/**

@@ -299,0 +299,0 @@ * @typedef {import('@appium/types').DriverType} DriverType

@@ -9,3 +9,3 @@ /**

*/
constructor({ config, json }: import('./extension-command').ExtensionCommandOptions<PluginType>);
constructor({ config, json }: import("./extension-command").ExtensionCommandOptions<PluginType>);
/**

@@ -31,3 +31,3 @@ * Install a plugin

*/
update({ plugin, unsafe }: PluginUpdateOpts): Promise<import('./extension-command').ExtensionUpdateResult>;
update({ plugin, unsafe }: PluginUpdateOpts): Promise<import("./extension-command").ExtensionUpdateResult>;
/**

@@ -38,3 +38,3 @@ *

*/
run({ plugin, scriptName, extraArgs }: PluginRunOptions): Promise<import('./extension-command').RunOutput>;
run({ plugin, scriptName, extraArgs }: PluginRunOptions): Promise<import("./extension-command").RunOutput>;
/**

@@ -49,7 +49,7 @@ * Runs doctor checks for the given plugin

}
export type ExtensionType = import('@appium/types').ExtensionType;
export type PluginType = import('@appium/types').PluginType;
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
export type ExtensionType = import("@appium/types").ExtensionType;
export type PluginType = import("@appium/types").PluginType;
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
/**
* Options for {@linkcode PluginCliCommand.install }
* Options for {@linkcode PluginCliCommand.install}
*/

@@ -70,5 +70,5 @@ export type PluginInstallOpts = {

};
export type InstallType = import('appium/types').InstallType;
export type InstallType = import("appium/types").InstallType;
/**
* Options for {@linkcode PluginCliCommand.uninstall }
* Options for {@linkcode PluginCliCommand.uninstall}
*/

@@ -82,3 +82,3 @@ export type PluginUninstallOpts = {

/**
* Options for {@linkcode PluginCliCommand.update }
* Options for {@linkcode PluginCliCommand.update}
*/

@@ -96,3 +96,3 @@ export type PluginUpdateOpts = {

/**
* Options for {@linkcode PluginCliCommand.run }.
* Options for {@linkcode PluginCliCommand.run}.
*/

@@ -114,3 +114,3 @@ export type PluginRunOptions = {

/**
* Options for {@linkcode PluginCliCommand.doctor }.
* Options for {@linkcode PluginCliCommand.doctor}.
*/

@@ -117,0 +117,0 @@ export type PluginDoctorOptions = {

@@ -6,3 +6,3 @@ /**

*/
export function getPresetDrivers(presetName: import('appium/types').CliCommandSetupSubcommand): Array<string>;
export function getPresetDrivers(presetName: import("appium/types").CliCommandSetupSubcommand): Array<string>;
/**

@@ -22,3 +22,3 @@ * Return desktop platform name for setup command description.

*/
export function runSetupCommand<SetupCmd extends "setup">(appiumHome: string, preConfigArgs: import("appium/types").Args<SetupCmd, void>, driverConfig: import("../extension/extension-config").ExtensionConfig<import("appium/types").CliExtensionCommand>, pluginConfig: import("../extension/extension-config").ExtensionConfig<import("appium/types").CliExtensionCommand>): Promise<void>;
export function runSetupCommand<SetupCmd extends import("appium/types").CliCommandSetup>(appiumHome: string, preConfigArgs: import("appium/types").Args<SetupCmd>, driverConfig: DriverConfig, pluginConfig: PluginConfig): Promise<void>;
/**

@@ -34,7 +34,7 @@ * Subcommands of preset for setup

export const DEFAULT_PLUGINS: string[];
export type CliExtensionCommand = import('appium/types').CliExtensionCommand;
export type CliExtensionSubcommand = import('appium/types').CliExtensionSubcommand;
export type PluginConfig = import('../extension/extension-config').ExtensionConfig<CliExtensionCommand>;
export type DriverConfig = import('../extension/extension-config').ExtensionConfig<CliExtensionCommand>;
export type Args = import('appium/types').Args<CliExtensionCommand, CliExtensionSubcommand>;
export type CliExtensionCommand = import("appium/types").CliExtensionCommand;
export type CliExtensionSubcommand = import("appium/types").CliExtensionSubcommand;
export type PluginConfig = import("../extension/extension-config").ExtensionConfig<CliExtensionCommand>;
export type DriverConfig = import("../extension/extension-config").ExtensionConfig<CliExtensionCommand>;
export type Args = import("appium/types").Args<CliExtensionCommand, CliExtensionSubcommand>;
//# sourceMappingURL=setup-command.d.ts.map

@@ -6,3 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.runSetupCommand = exports.determinePlatformName = exports.getPresetDrivers = exports.DEFAULT_PLUGINS = exports.SUBCOMMAND_BROWSER = exports.SUBCOMMAND_DESKTOP = exports.SUBCOMMAND_MOBILE = void 0;
exports.DEFAULT_PLUGINS = exports.SUBCOMMAND_BROWSER = exports.SUBCOMMAND_DESKTOP = exports.SUBCOMMAND_MOBILE = void 0;
exports.getPresetDrivers = getPresetDrivers;
exports.determinePlatformName = determinePlatformName;
exports.runSetupCommand = runSetupCommand;
const lodash_1 = __importDefault(require("lodash"));

@@ -51,3 +54,2 @@ const constants_1 = require("../constants");

}
exports.getPresetDrivers = getPresetDrivers;
/**

@@ -66,3 +68,2 @@ * Return desktop platform name for setup command description.

}
exports.determinePlatformName = determinePlatformName;
/**

@@ -93,3 +94,2 @@ * Run 'setup' command to install drivers/plugins into the given appium home.

}
exports.runSetupCommand = runSetupCommand;
;

@@ -96,0 +96,0 @@ /**

@@ -7,3 +7,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.RingBuffer = exports.spinWith = exports.log = exports.errAndQuit = exports.JSON_SPACES = void 0;
exports.RingBuffer = exports.JSON_SPACES = void 0;
exports.errAndQuit = errAndQuit;
exports.log = log;
exports.spinWith = spinWith;
const ora_1 = __importDefault(require("ora"));

@@ -28,3 +31,2 @@ exports.JSON_SPACES = 4;

}
exports.errAndQuit = errAndQuit;
/**

@@ -38,3 +40,2 @@ * Conditionally log something to the console

}
exports.log = log;
/**

@@ -62,3 +63,2 @@ * Start a spinner, execute an async function, and then stop the spinner

}
exports.spinWith = spinWith;
class RingBuffer {

@@ -65,0 +65,0 @@ constructor(size = 50) {

@@ -16,3 +16,3 @@ /**

*/
export function formatErrors(errors?: import('ajv').ErrorObject[], config?: ReadConfigFileResult['config'] | any, opts?: FormatConfigErrorsOptions | undefined): string;
export function formatErrors(errors?: import("ajv").ErrorObject[], config?: ReadConfigFileResult["config"] | any, opts?: FormatConfigErrorsOptions | undefined): string;
/**

@@ -35,3 +35,3 @@ * Given an optional path, read a config file. Validates the config file.

/**
* Result of calling {@link readConfigFile }.
* Result of calling {@link readConfigFile}.
*/

@@ -61,7 +61,7 @@ export type ReadConfigFileResult = {

/**
* Options for {@link readConfigFile }.
* Options for {@link readConfigFile}.
*/
export type ReadConfigFileOptions = {
/**
* If `false`, do not use color and fancy formatting in the `reason` property of the {@link ReadConfigFileResult }. The value of `reason` is then suitable for machine-reading.
* If `false`, do not use color and fancy formatting in the `reason` property of the {@link ReadConfigFileResult}. The value of `reason` is then suitable for machine-reading.
*/

@@ -77,7 +77,7 @@ pretty?: boolean | undefined;

*/
export type AppiumConfig = import('@appium/types').AppiumConfig;
export type AppiumConfig = import("@appium/types").AppiumConfig;
/**
* The contents of an Appium config file with camelcased property names (and using `appiumCliDest` value if present). Generated from {@link AppiumConfig }
* The contents of an Appium config file with camelcased property names (and using `appiumCliDest` value if present). Generated from {@link AppiumConfig}
*/
export type NormalizedAppiumConfig = import('@appium/types').NormalizedAppiumConfig;
export type NormalizedAppiumConfig = import("@appium/types").NormalizedAppiumConfig;
/**

@@ -88,3 +88,3 @@ * The string should be a raw JSON string.

/**
* Options for {@link formatErrors }.
* Options for {@link formatErrors}.
*/

@@ -91,0 +91,0 @@ export type FormatConfigErrorsOptions = {

@@ -6,3 +6,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeConfig = exports.readConfigFile = exports.formatErrors = void 0;
exports.formatErrors = formatErrors;
exports.readConfigFile = readConfigFile;
exports.normalizeConfig = normalizeConfig;
const better_ajv_errors_1 = __importDefault(require("@sidvind/better-ajv-errors"));

@@ -102,3 +104,2 @@ const lilconfig_1 = require("lilconfig");

}
exports.formatErrors = formatErrors;
/**

@@ -150,3 +151,2 @@ * Given an optional path, read a config file. Validates the config file.

}
exports.readConfigFile = readConfigFile;
/**

@@ -182,3 +182,2 @@ * Convert schema property names to either a) the value of the `appiumCliDest` property, if any; or b) camel-case

}
exports.normalizeConfig = normalizeConfig;
/**

@@ -185,0 +184,0 @@ * Result of calling {@link readConfigFile}.

@@ -17,4 +17,4 @@ /**

export function showDebugInfo({ driverConfig, pluginConfig, appiumHome }: {
driverConfig: import('./extension/driver-config').DriverConfig;
pluginConfig: import('./extension/plugin-config').PluginConfig;
driverConfig: import("./extension/driver-config").DriverConfig;
pluginConfig: import("./extension/plugin-config").PluginConfig;
appiumHome: string;

@@ -34,3 +34,3 @@ }): Promise<void>;

*/
export function getBuildInfo(): import('appium/types').BuildInfo;
export function getBuildInfo(): import("appium/types").BuildInfo;
/**

@@ -59,3 +59,3 @@ * @returns {void}

*/
export function showConfig(nonDefaultPreConfigParsedArgs: Partial<ParsedArgs>, configResult: import('./config-file').ReadConfigFileResult, defaults: Partial<ParsedArgs>, parsedArgs: ParsedArgs): void;
export function showConfig(nonDefaultPreConfigParsedArgs: Partial<ParsedArgs>, configResult: import("./config-file").ReadConfigFileResult, defaults: Partial<ParsedArgs>, parsedArgs: ParsedArgs): void;
/**

@@ -70,5 +70,5 @@ * @param {string} root

export const rootDir: string;
export type ParsedArgs = import('appium/types').ParsedArgs;
export type Args = import('appium/types').Args;
export type ParsedArgs = import("appium/types").ParsedArgs;
export type Args = import("appium/types").Args;
export type ArgSpec = import("./schema/arg-spec").ArgSpec<any>;
//# sourceMappingURL=config.d.ts.map

@@ -6,3 +6,12 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.requireDir = exports.showConfig = exports.getNonDefaultServerArgs = exports.showBuildInfo = exports.checkNodeOk = exports.getBuildInfo = exports.getGitRev = exports.showDebugInfo = exports.updateBuildInfo = exports.rootDir = exports.APPIUM_VER = void 0;
exports.rootDir = exports.APPIUM_VER = void 0;
exports.updateBuildInfo = updateBuildInfo;
exports.showDebugInfo = showDebugInfo;
exports.getGitRev = getGitRev;
exports.getBuildInfo = getBuildInfo;
exports.checkNodeOk = checkNodeOk;
exports.showBuildInfo = showBuildInfo;
exports.getNonDefaultServerArgs = getNonDefaultServerArgs;
exports.showConfig = showConfig;
exports.requireDir = requireDir;
/* eslint-disable no-console */

@@ -48,3 +57,2 @@ const lodash_1 = __importDefault(require("lodash"));

}
exports.updateBuildInfo = updateBuildInfo;
/** @type {() => Promise<string?>} */

@@ -108,3 +116,2 @@ const getFullGitPath = lodash_1.default.memoize(async function getFullGitPath() {

}
exports.showDebugInfo = showDebugInfo;
/**

@@ -140,3 +147,2 @@ * @param {boolean} [useGithubApiFallback]

}
exports.getGitRev = getGitRev;
/**

@@ -181,3 +187,2 @@ * @param {string} commitSha

}
exports.getBuildInfo = getBuildInfo;
/**

@@ -193,3 +198,2 @@ * @returns {void}

}
exports.checkNodeOk = checkNodeOk;
async function showBuildInfo() {

@@ -199,3 +203,2 @@ await updateBuildInfo(true);

}
exports.showBuildInfo = showBuildInfo;
/**

@@ -264,3 +267,2 @@ * Returns k/v pairs of server arguments which are _not_ the defaults.

}
exports.getNonDefaultServerArgs = getNonDefaultServerArgs;
/**

@@ -307,3 +309,2 @@ * Compacts an object for {@link showConfig}:

}
exports.showConfig = showConfig;
/**

@@ -343,3 +344,2 @@ * @param {string} root

}
exports.requireDir = requireDir;
/**

@@ -346,0 +346,0 @@ * Calculates the result of the given function and return its value

@@ -42,9 +42,3 @@ export const EXIT_CODE: Readonly<{

*/
run(): Promise<Readonly<{
SUCCESS: 0;
HAS_MAJOR_ISSUES: 127;
}>[keyof Readonly<{
SUCCESS: 0;
HAS_MAJOR_ISSUES: 127;
}>]>;
run(): Promise<0 | 127>;
/**

@@ -70,4 +64,4 @@ * @param {DoctorCheckResult} result

};
export type DoctorCheck = import('@appium/types').IDoctorCheck;
export type DoctorCheckResult = import('@appium/types').DoctorCheckResult;
export type DoctorCheck = import("@appium/types").IDoctorCheck;
export type DoctorCheckResult = import("@appium/types").DoctorCheckResult;
//# sourceMappingURL=doctor.d.ts.map

@@ -49,3 +49,3 @@ /**

*/
getConfigProblems(extData: ExtManifest<DriverType>): import('./extension-config').ExtManifestProblem[];
getConfigProblems(extData: ExtManifest<DriverType>): import("./extension-config").ExtManifestProblem[];
/**

@@ -57,3 +57,3 @@ * Given capabilities, find a matching driver within the config. Load its class and return it along with version and driver name.

*/
findMatchingDriver<C extends import("@appium/types").StringRecord<any>>({ automationName, platformName }: C): Promise<MatchedDriver>;
findMatchingDriver<C extends import("@appium/types").StringRecord>({ automationName, platformName }: C): Promise<MatchedDriver>;
/**

@@ -65,17 +65,17 @@ * Given an automation name and platform name, find a suitable driver and return its extension data.

*/
_getDriverBySupport(matchAutomationName: string, matchPlatformName: string): ExtMetadata<DriverType> & import('appium/types').InternalMetadata & import('appium/types').CommonExtMetadata;
_getDriverBySupport(matchAutomationName: string, matchPlatformName: string): ExtMetadata<DriverType> & import("appium/types").InternalMetadata & import("appium/types").CommonExtMetadata;
}
export type ExtMetadata<T extends import("@appium/types").ExtensionType> = import('appium/types').ExtMetadata<T>;
export type ExtManifest<T extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<T>;
export type ExtensionType = import('@appium/types').ExtensionType;
export type ManifestData = import('appium/types').ManifestData;
export type DriverType = import('@appium/types').DriverType;
export type Manifest = import('./manifest').Manifest;
export type ExtRecord<T extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<T>;
export type ExtName<T extends import("@appium/types").ExtensionType> = import('appium/types').ExtName<T>;
export type ExtMetadata<T extends ExtensionType> = import("appium/types").ExtMetadata<T>;
export type ExtManifest<T extends ExtensionType> = import("appium/types").ExtManifest<T>;
export type ExtensionType = import("@appium/types").ExtensionType;
export type ManifestData = import("appium/types").ManifestData;
export type DriverType = import("@appium/types").DriverType;
export type Manifest = import("./manifest").Manifest;
export type ExtRecord<T extends ExtensionType> = import("appium/types").ExtRecord<T>;
export type ExtName<T extends ExtensionType> = import("appium/types").ExtName<T>;
/**
* Return value of {@linkcode DriverConfig.findMatchingDriver }
* Return value of {@linkcode DriverConfig.findMatchingDriver}
*/
export type MatchedDriver = {
driver: import('@appium/types').DriverClass;
driver: import("@appium/types").DriverClass;
version: string;

@@ -82,0 +82,0 @@ driverName: string;

@@ -36,3 +36,3 @@ /**

*/
export class ExtensionConfig<ExtType extends import("@appium/types").ExtensionType> {
export class ExtensionConfig<ExtType extends ExtensionType> {
/**

@@ -56,3 +56,3 @@ * Intended to be called by corresponding instance methods of subclass.

*/
static extDataHasSchema<ExtType_1 extends import("@appium/types").ExtensionType>(extManifest: ExtManifest<ExtType_1>): extManifest is ExtManifestWithSchema<ExtType_1>;
static extDataHasSchema<ExtType_1 extends ExtensionType>(extManifest: ExtManifest<ExtType_1>): extManifest is ExtManifestWithSchema<ExtType_1>;
/**

@@ -77,3 +77,3 @@ * @protected

/** @type {import('@appium/types').AppiumLogger} */
log: import('@appium/types').AppiumLogger;
log: import("@appium/types").AppiumLogger;
/** @type {Manifest} */

@@ -136,3 +136,3 @@ manifest: Manifest;

*/
protected getListData(): Promise<import('../cli/extension-command').ExtensionList<ExtType>>;
protected getListData(): Promise<import("../cli/extension-command").ExtensionList<ExtType>>;
/**

@@ -239,7 +239,7 @@ * Returns a list of warnings for a particular extension.

*/
readExtensionSchema(extName: ExtName<ExtType>, extManifest: ExtManifestWithSchema<ExtType>): import('ajv').SchemaObject | undefined;
readExtensionSchema(extName: ExtName<ExtType>, extManifest: ExtManifestWithSchema<ExtType>): import("ajv").SchemaObject | undefined;
#private;
}
/**
* An issue with the {@linkcode ExtManifest } for a particular extension.
* An issue with the {@linkcode ExtManifest} for a particular extension.
*

@@ -259,18 +259,18 @@ * The existance of such an object implies that the extension cannot be loaded.

/**
* An optional logging function provided to an {@link ExtensionConfig } subclass.
* An optional logging function provided to an {@link ExtensionConfig} subclass.
*/
export type ExtensionLogFn = (...args: any[]) => void;
export type ExtensionType = import('@appium/types').ExtensionType;
export type Manifest = import('./manifest').Manifest;
export type InstallType = import('appium/types').InstallType;
export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
export type ExtManifestWithSchema<ExtType extends import("@appium/types").ExtensionType> = ExtManifest<ExtType> & {
schema: NonNullable<ExtManifest<ExtType>['schema']>;
export type ExtensionType = import("@appium/types").ExtensionType;
export type Manifest = import("./manifest").Manifest;
export type InstallType = import("appium/types").InstallType;
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
export type ExtManifestWithSchema<ExtType extends ExtensionType> = ExtManifest<ExtType> & {
schema: NonNullable<ExtManifest<ExtType>["schema"]>;
};
export type ExtName<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtName<ExtType>;
export type ExtClass<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtClass<ExtType>;
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
export type ExtCommand<ExtType extends import("@appium/types").ExtensionType> = import('../cli/extension').ExtCommand<ExtType>;
export type ExtName<ExtType extends ExtensionType> = import("appium/types").ExtName<ExtType>;
export type ExtClass<ExtType extends ExtensionType> = import("appium/types").ExtClass<ExtType>;
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
export type ExtCommand<ExtType extends ExtensionType> = import("../cli/extension").ExtCommand<ExtType>;
/**
* Options for various methods in {@link ExtensionConfig }
* Options for various methods in {@link ExtensionConfig}
*/

@@ -277,0 +277,0 @@ export type ExtensionConfigMutationOpts = {

@@ -24,3 +24,3 @@ /**

*/
export function getActivePlugins(pluginConfig: import('./plugin-config').PluginConfig, maxParallelImports: number, usePlugins?: string[]): Promise<PluginNameMap>;
export function getActivePlugins(pluginConfig: import("./plugin-config").PluginConfig, maxParallelImports: number, usePlugins?: string[]): Promise<PluginNameMap>;
/**

@@ -36,17 +36,17 @@ * Find any driver name which has been installed, and turn each one into its class, so we can send

*/
export function getActiveDrivers(driverConfig: import('./driver-config').DriverConfig, maxParallelImports: number, useDrivers?: string[] | undefined): Promise<DriverNameMap>;
export function getActiveDrivers(driverConfig: import("./driver-config").DriverConfig, maxParallelImports: number, useDrivers?: string[] | undefined): Promise<DriverNameMap>;
/**
* A mapping of {@linkcode PluginClass } classes to their names.
* A mapping of {@linkcode PluginClass} classes to their names.
*/
export type PluginNameMap = Map<PluginClass, string>;
/**
* A mapping of {@linkcode DriverClass } classes to their names.
* A mapping of {@linkcode DriverClass} classes to their names.
*/
export type DriverNameMap = Map<DriverClass, string>;
export type PluginClass = import('@appium/types').PluginClass;
export type DriverClass = import('@appium/types').DriverClass;
export type PluginClass = import("@appium/types").PluginClass;
export type DriverClass = import("@appium/types").DriverClass;
export type ExtensionConfigs = {
driverConfig: import('./driver-config').DriverConfig;
pluginConfig: import('./plugin-config').PluginConfig;
driverConfig: import("./driver-config").DriverConfig;
pluginConfig: import("./plugin-config").PluginConfig;
};
//# sourceMappingURL=index.d.ts.map

@@ -6,3 +6,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getActiveDrivers = exports.getActivePlugins = exports.loadExtensions = void 0;
exports.loadExtensions = loadExtensions;
exports.getActivePlugins = getActivePlugins;
exports.getActiveDrivers = getActiveDrivers;
const lodash_1 = __importDefault(require("lodash"));

@@ -35,3 +37,2 @@ const constants_1 = require("../constants");

}
exports.loadExtensions = loadExtensions;
/**

@@ -114,3 +115,2 @@ * @template {'driver'|'plugin'} TExtType

}
exports.getActivePlugins = getActivePlugins;
/**

@@ -150,3 +150,2 @@ * Find any driver name which has been installed, and turn each one into its class, so we can send

}
exports.getActiveDrivers = getActiveDrivers;
/**

@@ -153,0 +152,0 @@ * A mapping of {@linkcode PluginClass} classes to their names.

@@ -18,11 +18,11 @@ /**

export type Migration = (manifest: Readonly<Manifest>) => boolean | Promise<boolean>;
export type ManifestData = import('appium/types').ManifestData;
export type DriverType = import('@appium/types').DriverType;
export type PluginType = import('@appium/types').PluginType;
export type AnyManifestDataVersion = import('appium/types').AnyManifestDataVersion;
export type ManifestDataVersions = import('appium/types').ManifestDataVersions;
export type ExtensionType = import('@appium/types').ExtensionType;
export type ManifestDataV2 = import('appium/types').ManifestV2.ManifestData;
export type Manifest = import('./manifest').Manifest;
export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
export type ManifestData = import("appium/types").ManifestData;
export type DriverType = import("@appium/types").DriverType;
export type PluginType = import("@appium/types").PluginType;
export type AnyManifestDataVersion = import("appium/types").AnyManifestDataVersion;
export type ManifestDataVersions = import("appium/types").ManifestDataVersions;
export type ExtensionType = import("@appium/types").ExtensionType;
export type ManifestDataV2 = import("appium/types").ManifestV2.ManifestData;
export type Manifest = import("./manifest").Manifest;
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
//# sourceMappingURL=manifest-migrations.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.migrate = void 0;
exports.migrate = migrate;
const constants_1 = require("../constants");

@@ -110,3 +110,2 @@ const logger_1 = __importDefault(require("../logger"));

}
exports.migrate = migrate;
/**

@@ -113,0 +112,0 @@ * A migration function. It will return `true` if a change _should be made_.

@@ -48,3 +48,3 @@ /**

*/
addExtensionFromPackage<ExtType extends import("@appium/types").ExtensionType>(pkgJson: ExtPackageJson<ExtType>, pkgPath: string, installType?: "npm" | "dev" | undefined): boolean;
addExtensionFromPackage<ExtType extends ExtensionType>(pkgJson: ExtPackageJson<ExtType>, pkgPath: string, installType?: "npm" | "dev" | undefined): boolean;
/**

@@ -61,3 +61,3 @@ * Adds an extension to the manifest as was installed by the `appium` CLI. The

*/
setExtension<ExtType_1 extends import("@appium/types").ExtensionType>(extType: ExtType_1, extName: string, extData: ExtManifest<ExtType_1>): ExtManifest<ExtType_1>;
setExtension<ExtType extends ExtensionType>(extType: ExtType, extName: string, extData: ExtManifest<ExtType>): ExtManifest<ExtType>;
/**

@@ -67,3 +67,3 @@ * Sets the schema revision

*/
setSchemaRev(rev: keyof import('./manifest-migrations').ManifestDataVersions): void;
setSchemaRev(rev: keyof import("./manifest-migrations").ManifestDataVersions): void;
/**

@@ -94,3 +94,3 @@ * Remove an extension from the manifest.

*/
getExtensionData<ExtType_2 extends import("@appium/types").ExtensionType>(extType: ExtType_2): Readonly<ExtRecord<ExtType_2>>;
getExtensionData<ExtType extends ExtensionType>(extType: ExtType): Readonly<ExtRecord<ExtType>>;
/**

@@ -128,7 +128,7 @@ * Reads manifest from disk and _overwrites_ the internal data.

*/
export type DriverType = import('@appium/types').DriverType;
export type DriverType = import("@appium/types").DriverType;
/**
* Type of the string referring to a plugin (typically as a key or type string)
*/
export type PluginType = import('@appium/types').PluginType;
export type PluginType = import("@appium/types").PluginType;
export type SyncWithInstalledExtensionsOpts = {

@@ -140,12 +140,12 @@ /**

};
export type ManifestData = import('appium/types').ManifestData;
export type InternalMetadata = import('appium/types').InternalMetadata;
export type ExtPackageJson<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtPackageJson<ExtType>;
export type ExtManifest<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtManifest<ExtType>;
export type ExtRecord<ExtType extends import("@appium/types").ExtensionType> = import('appium/types').ExtRecord<ExtType>;
export type ManifestData = import("appium/types").ManifestData;
export type InternalMetadata = import("appium/types").InternalMetadata;
export type ExtPackageJson<ExtType extends ExtensionType> = import("appium/types").ExtPackageJson<ExtType>;
export type ExtManifest<ExtType extends ExtensionType> = import("appium/types").ExtManifest<ExtType>;
export type ExtRecord<ExtType extends ExtensionType> = import("appium/types").ExtRecord<ExtType>;
/**
* Either `driver` or `plugin` rn
*/
export type ExtensionType = import('@appium/types').ExtensionType;
export type ExtensionType = import("@appium/types").ExtensionType;
import _ from 'lodash';
//# sourceMappingURL=manifest.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.packageDidChange = void 0;
exports.packageDidChange = packageDidChange;
const support_1 = require("@appium/support");

@@ -62,3 +62,2 @@ const package_changed_1 = require("package-changed");

}
exports.packageDidChange = packageDidChange;
//# sourceMappingURL=package-changed.js.map

@@ -44,3 +44,3 @@ /**

*/
print(activeNames: (keyof import('appium/types').ExtRecord<PluginType>)[]): void;
print(activeNames: (keyof import("appium/types").ExtRecord<PluginType>)[]): void;
}

@@ -53,6 +53,6 @@ export type PluginConfigOptions = {

};
export type PluginType = import('@appium/types').PluginType;
export type PluginMetadata = import('appium/types').ExtMetadata<PluginType>;
export type Manifest = import('./manifest').Manifest;
export type PluginType = import("@appium/types").PluginType;
export type PluginMetadata = import("appium/types").ExtMetadata<PluginType>;
export type Manifest = import("./manifest").Manifest;
import { ExtensionConfig } from './extension-config';
//# sourceMappingURL=plugin-config.d.ts.map

@@ -6,3 +6,3 @@ /**

*/
export function init(args: import('../types').ParsedArgs): Promise<void>;
export function init(args: import("../types").ParsedArgs): Promise<void>;
/**

@@ -13,4 +13,4 @@ * @returns {void}

export default init;
export type ParsedArgs = import('appium/types').ParsedArgs;
export type MessageObject = import('@appium/logger').MessageObject;
export type ParsedArgs = import("appium/types").ParsedArgs;
export type MessageObject = import("@appium/logger").MessageObject;
//# sourceMappingURL=logsink.d.ts.map

@@ -6,3 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.clear = exports.init = void 0;
exports.init = init;
exports.clear = clear;
const logger_1 = __importDefault(require("@appium/logger"));

@@ -103,3 +104,2 @@ const winston_1 = require("winston");

}
exports.init = init;
/**

@@ -112,3 +112,2 @@ * @returns {void}

}
exports.clear = clear;
// set the custom colors

@@ -141,3 +140,3 @@ const colorizeFormat = winston_1.format.colorize({

stderrLevels: ['error'],
format: winston_1.format.combine(formatTimestamp(args), isLogColorEnabled(args) ? colorizeFormat : stripColorFormat, winston_1.format.printf(formatLogLine(args, true))),
format: winston_1.format.combine(formatTimestamp(args), isLogColorEnabled(args) ? colorizeFormat : stripColorFormat, formatLog(args, true)),
});

@@ -161,3 +160,3 @@ }

level: logLvl,
format: winston_1.format.combine(stripColorFormat, formatTimestamp(args), winston_1.format.printf(formatLogLine(args, false))),
format: winston_1.format.combine(stripColorFormat, formatTimestamp(args), formatLog(args, false)),
});

@@ -189,3 +188,3 @@ }

level: logLvl,
format: winston_1.format.combine(stripColorFormat, winston_1.format.printf(formatLogLine(args, false))),
format: winston_1.format.combine(stripColorFormat, formatLog(args, false)),
});

@@ -268,13 +267,19 @@ }

* @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 };
function formatLog(args, targetConsole) {
if (['json', 'pretty_json'].includes(args.logFormat)) {
return winston_1.format.combine((0, winston_1.format)((info) => {
const infoCopy = { ...info };
const contextInfo = logger_1.default.asyncStorage.getStore() ?? {};
if (targetConsole && !args.logTimestamp) {
delete infoCopy.timestamp;
}
return JSON.stringify(infoCopy, null, args.logFormat === 'pretty_json' ? 2 : undefined);
}
if (!lodash_1.default.isEmpty(contextInfo)) {
infoCopy.context = { ...contextInfo };
}
return infoCopy;
})(), winston_1.format.json({ space: args.logFormat === 'pretty_json' ? 2 : undefined }));
}
return winston_1.format.printf((info) => {
if (targetConsole) {

@@ -284,3 +289,3 @@ return `${args.logTimestamp ? `${info.timestamp} - ` : ''}${info.message}`;

return `${info.timestamp} ${info.message}`;
};
});
}

@@ -287,0 +292,0 @@ /**

#!/usr/bin/env node
export { readConfigFile } from "./config-file";
export type DriverType = import('@appium/types').DriverType;
export type PluginType = import('@appium/types').PluginType;
export type DriverClass = import('@appium/types').DriverClass;
export type PluginClass = import('@appium/types').PluginClass;
export type CliCommand = import('appium/types').CliCommand;
export type CliExtensionSubcommand = import('appium/types').CliExtensionSubcommand;
export type CliExtensionCommand = import('appium/types').CliExtensionCommand;
export type ServerCommand = import('appium/types').CliCommandServer;
export type DriverCommand = import('appium/types').CliCommandDriver;
export type PluginCommand = import('appium/types').CliCommandPlugin;
export type SetupCommand = import('appium/types').CliCommandSetup;
export type DriverNameMap = import('./extension').DriverNameMap;
export type PluginNameMap = import('./extension').PluginNameMap;
export type DriverType = import("@appium/types").DriverType;
export type PluginType = import("@appium/types").PluginType;
export type DriverClass = import("@appium/types").DriverClass;
export type PluginClass = import("@appium/types").PluginClass;
export type CliCommand = import("appium/types").CliCommand;
export type CliExtensionSubcommand = import("appium/types").CliExtensionSubcommand;
export type CliExtensionCommand = import("appium/types").CliExtensionCommand;
export type ServerCommand = import("appium/types").CliCommandServer;
export type DriverCommand = import("appium/types").CliCommandDriver;
export type PluginCommand = import("appium/types").CliCommandPlugin;
export type SetupCommand = import("appium/types").CliCommandSetup;
export type DriverNameMap = import("./extension").DriverNameMap;
export type PluginNameMap = import("./extension").PluginNameMap;
/**

@@ -24,7 +24,7 @@ * Literally an empty object

*/
appiumDriver: import('./appium').AppiumDriver;
appiumDriver: import("./appium").AppiumDriver;
/**
* - The parsed arguments
*/
parsedArgs: import('appium/types').ParsedArgs;
parsedArgs: import("appium/types").ParsedArgs;
/**

@@ -35,5 +35,5 @@ * - The full path to the Appium home folder

};
export type InitResult<Cmd extends import("appium/types").CliCommand> = Cmd extends ServerCommand ? ServerInitData & import('./extension').ExtensionConfigs : ExtCommandInitResult;
export type Args<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void> = import('appium/types').Args<Cmd, SubCmd>;
export type ParsedArgs<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void> = import('appium/types').ParsedArgs<Cmd, SubCmd>;
export type InitResult<Cmd extends CliCommand> = Cmd extends ServerCommand ? ServerInitData & import("./extension").ExtensionConfigs : ExtCommandInitResult;
export type Args<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void> = import("appium/types").Args<Cmd, SubCmd>;
export type ParsedArgs<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void> = import("appium/types").ParsedArgs<Cmd, SubCmd>;
/**

@@ -47,3 +47,3 @@ * Initializes Appium's config. Starts server if appropriate and resolves the

*/
export function main<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void>(args?: import("appium/types").Args<Cmd, SubCmd> | undefined): Promise<Cmd extends "server" ? import("@appium/types").AppiumServer : void>;
export function main<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void>(args?: import("appium/types").Args<Cmd, SubCmd> | undefined): Promise<Cmd extends ServerCommand ? import("@appium/types").AppiumServer : void>;
/**

@@ -66,3 +66,3 @@ * Initializes Appium, but does not start the server.

*/
export function init<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void>(args?: import("appium/types").Args<Cmd, SubCmd> | undefined): Promise<InitResult<Cmd>>;
export function init<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void>(args?: import("appium/types").Args<Cmd, SubCmd> | undefined): Promise<InitResult<Cmd>>;
export const resolveAppiumHome: ((cwd?: string | undefined) => Promise<string>) & _.MemoizedFunction;

@@ -69,0 +69,0 @@ import _ from 'lodash';

@@ -7,3 +7,5 @@ #!/usr/bin/env node

Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveAppiumHome = exports.init = exports.main = exports.validate = exports.getSchema = exports.finalizeSchema = exports.readConfigFile = void 0;
exports.resolveAppiumHome = exports.validate = exports.getSchema = exports.finalizeSchema = exports.readConfigFile = void 0;
exports.main = main;
exports.init = init;
const ws_1 = require("ws");

@@ -202,8 +204,12 @@ const logsink_1 = require("./logsink"); // this import needs to come first since it sets up global npmlog

const { issues, rules } = await logger_1.default.unwrap().loadSecureValuesPreprocessingRules(serverArgs.logFilters);
const argToLog = lodash_1.default.truncate(JSON.stringify(serverArgs.logFilters), {
length: 150
});
if (!lodash_1.default.isEmpty(issues)) {
throw new Error(`The log filtering rules config '${serverArgs.logFilters}' has issues: ` +
throw new Error(`The log filtering rules config ${argToLog} has issues: ` +
JSON.stringify(issues, null, 2));
}
if (lodash_1.default.isEmpty(rules)) {
logger_1.default.warn(`Found no log filtering rules in '${serverArgs.logFilters}'. Is that expected?`);
logger_1.default.warn(`Found no log filtering rules in the ${argToLog} config. ` +
`Is that expected?`);
}

@@ -251,3 +257,2 @@ else {

}
exports.init = init;
/**

@@ -369,3 +374,2 @@ * Prints the actual server address and the list of URLs that

}
exports.main = main;
// NOTE: this is here for backwards compat for any scripts referencing `main.js` directly

@@ -372,0 +376,0 @@ // (more specifically, `build/lib/main.js`)

@@ -134,3 +134,3 @@ /**

/**
* Options for {@link ArgSpec.create }
* Options for {@link ArgSpec.create}
*/

@@ -143,3 +143,3 @@ export type ArgSpecOptions<D> = {

};
export type ExtensionType = import('@appium/types').ExtensionType;
export type ExtensionType = import("@appium/types").ExtensionType;
//# sourceMappingURL=arg-spec.d.ts.map

@@ -9,12 +9,12 @@ /**

*/
export function toParserArgs(): import('../cli/args').ArgumentDefinitions;
export function toParserArgs(): import("../cli/args").ArgumentDefinitions;
/**
* <T>
*/
export type FormatValidator<T extends string | number> = import('ajv/dist/types').FormatValidator<T>;
export type FormatValidator<T extends string | number> = import("ajv/dist/types").FormatValidator<T>;
/**
* A JSON 7 schema with our custom keywords.
*/
export type AppiumJSONSchema = import('./keywords').AppiumJSONSchemaKeywords & import('json-schema').JSONSchema7;
export type AppiumJSONSchema = import("./keywords").AppiumJSONSchemaKeywords & import("json-schema").JSONSchema7;
export type ArgSpec = import("./arg-spec").ArgSpec<any>;
//# sourceMappingURL=cli-args.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.toParserArgs = void 0;
exports.toParserArgs = toParserArgs;
const argparse_1 = require("argparse");

@@ -218,3 +218,2 @@ const lodash_1 = __importDefault(require("lodash"));

}
exports.toParserArgs = toParserArgs;
/**

@@ -221,0 +220,0 @@ * @template {string|number} T

@@ -17,4 +17,4 @@ /**

function csv(csvOrPath: string): string[];
function json(jsonOrPath: string): any;
function json(jsonOrPath: string): object;
}
//# sourceMappingURL=cli-transformers.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformers = exports.parseCsvLine = void 0;
exports.transformers = void 0;
exports.parseCsvLine = parseCsvLine;
const argparse_1 = require("argparse");

@@ -25,3 +26,2 @@ const fs_1 = require("fs");

}
exports.parseCsvLine = parseCsvLine;
/**

@@ -28,0 +28,0 @@ * Split a file by newline then calls {@link parseCsvLine} on each line.

@@ -11,3 +11,3 @@ /**

*/
export type AppiumCliTransformerName = 'csv' | 'json';
export type AppiumCliTransformerName = "csv" | "json";
/**

@@ -24,3 +24,3 @@ * These are the custom keywords that Appium recognizes.

};
export type KeywordDefinition = import('ajv').KeywordDefinition;
export type KeywordDefinition = import("ajv").KeywordDefinition;
//# sourceMappingURL=keywords.d.ts.map

@@ -8,8 +8,2 @@ /**

export class RoachHotelMap<K, V> extends Map<K, V> {
/**
* Lookup of schema IDs to finalized schemas.
*
* This does not include references, but rather the root schemas themselves.
* @type {Record<string,StrictSchemaObject>?}
*/
constructor();

@@ -184,3 +178,3 @@ constructor(entries?: readonly (readonly [K, V])[] | null | undefined);

*/
export function validate(value: any, ref?: string | undefined): import('ajv').ErrorObject[];
export function validate(value: any, ref?: string | undefined): import("ajv").ErrorObject[];
/**

@@ -235,10 +229,10 @@ * Retrieves the schema itself

*/
export function isAllowedSchemaFileExtension(filename: import('type-fest').LiteralUnion<AllowedSchemaExtension, string>): boolean;
export function isAllowedSchemaFileExtension(filename: import("type-fest").LiteralUnion<AllowedSchemaExtension, string>): boolean;
/**
* Appium only supports schemas that are plain objects; not arrays.
*/
export type SchemaObject = import('ajv').SchemaObject & {
export type SchemaObject = import("ajv").SchemaObject & {
[key: number]: never;
};
export type ExtensionType = import('@appium/types').ExtensionType;
export type ExtensionType = import("@appium/types").ExtensionType;
/**

@@ -251,7 +245,7 @@ * An object having property `additionalProperties: false`

/**
* A {@link SchemaObject } with `additionalProperties: false`
* A {@link SchemaObject} with `additionalProperties: false`
*/
export type StrictSchemaObject = SchemaObject & StrictProp;
/**
* A list of schemas associated with properties and their corresponding {@link ArgSpec } objects.
* A list of schemas associated with properties and their corresponding {@link ArgSpec} objects.
*

@@ -264,3 +258,3 @@ * Intermediate data structure used when converting the entire schema down to CLI arguments.

}[];
export type ArgSpecDefaultValue = ArgSpec<any>['defaultValue'];
export type ArgSpecDefaultValue = any;
/**

@@ -271,7 +265,7 @@ * e.g. `{driver: {foo: 'bar'}}` where `foo` is the arg name and `bar` is the default value.

/**
* Helper type for the return value of {@link AppiumSchema.getDefaults }
* Helper type for the return value of {@link AppiumSchema.getDefaults}
*/
export type DefaultValues<Flattened extends boolean | undefined> = Record<string, Flattened extends true ? ArgSpecDefaultValue : ArgSpecDefaultValue | NestedArgSpecDefaultValue>;
export type AllowedSchemaExtension = '.json' | '.js' | '.cjs';
export type AllowedSchemaExtension = ".json" | ".js" | ".cjs";
import { ArgSpec } from './arg-spec';
//# sourceMappingURL=schema.d.ts.map

@@ -1,2 +0,1 @@

/// <reference types="node" />
/**

@@ -14,48 +13,3 @@ * Creates an error object in case a session gets incompatible capabilities as the input.

*/
export function isServerCommandArgs<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void>(args: import("appium/types").Args<Cmd, SubCmd>): args is {
subcommand?: import("appium/types").CliCommand | undefined;
configFile?: string | undefined;
showConfig?: boolean | undefined;
showDebugInfo?: boolean | undefined;
shell?: boolean | undefined;
throwInsteadOfExit?: boolean | undefined;
logHandler?: ((...args: any[]) => void) | undefined;
appiumHome?: string | undefined;
showBuildInfo?: boolean | undefined;
driver?: import("@appium/types").DriverConfig | undefined;
plugin?: import("@appium/types").PluginConfig | undefined;
address?: string | undefined;
nodeconfig?: import("@appium/types").NodeconfigConfig | undefined;
port?: number | undefined;
webhook?: string | undefined;
logFile?: string | undefined;
allowCors?: NonNullable<boolean | undefined> | undefined;
allowInsecure?: import("@appium/types").AllowInsecureConfig | undefined;
basePath?: string | undefined;
callbackAddress?: string | undefined;
callbackPort?: number | undefined;
debugLogSpacing?: NonNullable<boolean | undefined> | undefined;
defaultCapabilities?: import("@appium/types").DefaultCapabilitiesConfig | undefined;
denyInsecure?: import("@appium/types").DenyInsecureConfig | undefined;
keepAliveTimeout?: number | undefined;
localTimezone?: NonNullable<boolean | undefined> | undefined;
logFilters?: import("@appium/types").LogFiltersConfig | undefined;
logFormat?: NonNullable<import("@appium/types").LogFormatConfig | undefined> | undefined;
logNoColors?: NonNullable<boolean | undefined> | undefined;
logTimestamp?: NonNullable<boolean | undefined> | undefined;
pluginsImportChunkSize?: number | undefined;
driversImportChunkSize?: number | undefined;
longStacktrace?: NonNullable<boolean | undefined> | undefined;
noPermsCheck?: NonNullable<boolean | undefined> | undefined;
sessionOverride?: NonNullable<boolean | undefined> | undefined;
strictCaps?: NonNullable<boolean | undefined> | undefined;
traceDir?: string | undefined;
useDrivers?: import("@appium/types").UseDriversConfig | undefined;
usePlugins?: import("@appium/types").UsePluginsConfig | undefined;
sslKeyPath?: string | undefined;
loglevel?: NonNullable<import("@appium/types").LogLevelConfig | undefined> | undefined;
relaxedSecurityEnabled?: NonNullable<boolean | undefined> | undefined;
tmpDir?: string | undefined;
sslCertificatePath?: string | undefined;
};
export function isServerCommandArgs<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void>(args: Args<Cmd, SubCmd>): args is Args<ServerCommand>;
/**

@@ -67,3 +21,3 @@ * @template {CliCommand} Cmd

*/
export function isSetupCommandArgs<Cmd extends import("appium/types").CliCommand, SubCmd extends void | import("appium/types").CliCommandSetupSubcommand | import("appium/types").CliExtensionSubcommand = void>(args: import("appium/types").Args<Cmd, SubCmd>): args is import("appium/types").ParsedArgs<"setup", void>;
export function isSetupCommandArgs<Cmd extends CliCommand, SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void>(args: Args<Cmd, SubCmd>): args is Args<SetupCommand>;
/**

@@ -75,3 +29,3 @@ * @template {CliCommand} [Cmd=ServerCommand]

*/
export function isExtensionCommandArgs<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliExtensionSubcommand = void>(args: import("appium/types").Args<Cmd, SubCmd>): args is import("appium/types").ParsedArgs<"driver", SubCmd> | import("appium/types").ParsedArgs<"plugin", SubCmd>;
export function isExtensionCommandArgs<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | void = void>(args: Args<Cmd, SubCmd>): args is Args<CliExtensionCommand, SubCmd>;
/**

@@ -83,3 +37,3 @@ * @template {CliCommand} Cmd

*/
export function isDriverCommandArgs<Cmd extends import("appium/types").CliCommand, SubCmd extends import("appium/types").CliExtensionSubcommand>(args: import("appium/types").Args<Cmd, SubCmd>): args is import("appium/types").ParsedArgs<"driver", SubCmd>;
export function isDriverCommandArgs<Cmd extends CliCommand, SubCmd extends CliExtensionSubcommand>(args: Args<Cmd, SubCmd>): args is Args<DriverCommand, SubCmd>;
/**

@@ -91,3 +45,3 @@ * @template {CliCommand} Cmd

*/
export function isPluginCommandArgs<Cmd extends import("appium/types").CliCommand, SubCmd extends import("appium/types").CliExtensionSubcommand>(args: import("appium/types").Args<Cmd, SubCmd>): args is import("appium/types").ParsedArgs<"plugin", SubCmd>;
export function isPluginCommandArgs<Cmd extends CliCommand, SubCmd extends CliExtensionSubcommand>(args: Args<Cmd, SubCmd>): args is Args<PluginCommand, SubCmd>;
/**

@@ -112,5 +66,5 @@ * Fetches the list of matched network interfaces of the current host.

export const npmPackage: import("read-pkg").NormalizedPackageJson;
export type StringRecord = import('@appium/types').StringRecord;
export type BaseDriverCapConstraints = import('@appium/types').BaseDriverCapConstraints;
export type ParsedDriverCaps<C extends import("@appium/types").Constraints = {
export type StringRecord = import("@appium/types").StringRecord;
export type BaseDriverCapConstraints = import("@appium/types").BaseDriverCapConstraints;
export type ParsedDriverCaps<C extends Constraints = {
readonly platformName: {

@@ -171,3 +125,3 @@ readonly presence: true;

};
export type InvalidCaps<C extends import("@appium/types").Constraints = {
export type InvalidCaps<C extends Constraints = {
readonly platformName: {

@@ -229,18 +183,18 @@ readonly presence: true;

};
export type Capabilities<C extends import("@appium/types").Constraints> = import('@appium/types').Capabilities<C>;
export type W3CCapabilities<C extends import("@appium/types").Constraints> = import('@appium/types').W3CCapabilities<C>;
export type NSCapabilities<C extends import("@appium/types").Constraints> = import('@appium/types').NSCapabilities<C>;
export type ConstraintsToCaps<C extends import("@appium/types").Constraints> = import('@appium/types').ConstraintsToCaps<C>;
export type StringKeyOf<T> = import('type-fest').StringKeyOf<T>;
export type Constraints = import('@appium/types').Constraints;
export type CliCommand = import('appium/types').CliCommand;
export type CliExtensionSubcommand = import('appium/types').CliExtensionSubcommand;
export type CliExtensionCommand = import('appium/types').CliExtensionCommand;
export type CliCommandSetupSubcommand = import('appium/types').CliCommandSetupSubcommand;
export type ServerCommand = import('appium/types').CliCommandServer;
export type DriverCommand = import('appium/types').CliCommandDriver;
export type PluginCommand = import('appium/types').CliCommandPlugin;
export type SetupCommand = import('appium/types').CliCommandSetup;
export type Args<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliCommandSetupSubcommand | import("appium/types").CliExtensionSubcommand = void> = import('appium/types').Args<Cmd, SubCmd>;
export type ParsedArgs<Cmd extends import("appium/types").CliCommand = "server", SubCmd extends void | import("appium/types").CliCommandSetupSubcommand | import("appium/types").CliExtensionSubcommand = void> = import('appium/types').ParsedArgs<Cmd, SubCmd>;
export type Capabilities<C extends Constraints> = import("@appium/types").Capabilities<C>;
export type W3CCapabilities<C extends Constraints> = import("@appium/types").W3CCapabilities<C>;
export type NSCapabilities<C extends Constraints> = import("@appium/types").NSCapabilities<C>;
export type ConstraintsToCaps<C extends Constraints> = import("@appium/types").ConstraintsToCaps<C>;
export type StringKeyOf<T> = import("type-fest").StringKeyOf<T>;
export type Constraints = import("@appium/types").Constraints;
export type CliCommand = import("appium/types").CliCommand;
export type CliExtensionSubcommand = import("appium/types").CliExtensionSubcommand;
export type CliExtensionCommand = import("appium/types").CliExtensionCommand;
export type CliCommandSetupSubcommand = import("appium/types").CliCommandSetupSubcommand;
export type ServerCommand = import("appium/types").CliCommandServer;
export type DriverCommand = import("appium/types").CliCommandDriver;
export type PluginCommand = import("appium/types").CliCommandPlugin;
export type SetupCommand = import("appium/types").CliCommandSetup;
export type Args<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void> = import("appium/types").Args<Cmd, SubCmd>;
export type ParsedArgs<Cmd extends CliCommand = "server", SubCmd extends CliExtensionSubcommand | CliCommandSetupSubcommand | void = void> = import("appium/types").ParsedArgs<Cmd, SubCmd>;
import os from 'node:os';

@@ -265,3 +219,3 @@ /**

*/
export function parseCapsForInnerDriver<C extends import("@appium/types").Constraints, J = any>(jsonwpCapabilities: J, w3cCapabilities: import("@appium/types").W3CCapabilities<C>, constraints?: C, defaultCapabilities?: Partial<import("@appium/types").CapsToNSCaps<import("@appium/types").ConstraintsToCaps<C>, "appium">> | undefined): ParsedDriverCaps<C, J> | InvalidCaps<C, J>;
export function parseCapsForInnerDriver<C extends Constraints, J = any>(jsonwpCapabilities: J, w3cCapabilities: W3CCapabilities<C>, constraints?: C, defaultCapabilities?: Partial<import("@appium/types").CapsToNSCaps<import("@appium/types").ConstraintsToCaps<C>, "appium">> | undefined): ParsedDriverCaps<C, J> | InvalidCaps<C, J>;
/**

@@ -273,3 +227,3 @@ * Takes a capabilities objects and prefixes capabilities with `appium:`

*/
export function insertAppiumPrefixes<C extends import("@appium/types").Constraints = {}>(caps: import("@appium/types").ConstraintsToCaps<C>): Partial<import("@appium/types").CapsToNSCaps<import("@appium/types").ConstraintsToCaps<C>, "appium">>;
export function insertAppiumPrefixes<C extends Constraints = {}>(caps: Capabilities<C>): NSCapabilities<C>;
/**

@@ -310,3 +264,3 @@ *

*/
export function removeAppiumPrefixes<C extends import("@appium/types").Constraints = {}>(caps: Partial<import("@appium/types").CapsToNSCaps<import("@appium/types").ConstraintsToCaps<C>, "appium">>): import("@appium/types").ConstraintsToCaps<C>;
export function removeAppiumPrefixes<C extends Constraints = {}>(caps: NSCapabilities<C>): Capabilities<C>;
/**

@@ -313,0 +267,0 @@ * Adjusts NODE_PATH environment variable,

@@ -6,3 +6,17 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.adjustNodePath = exports.removeAppiumPrefixes = exports.pullSettings = exports.getPackageVersion = exports.insertAppiumPrefixes = exports.parseCapsForInnerDriver = exports.inspect = exports.adler32 = exports.fetchInterfaces = exports.isPluginCommandArgs = exports.isDriverCommandArgs = exports.isExtensionCommandArgs = exports.isSetupCommandArgs = exports.isServerCommandArgs = exports.makeNonW3cCapsError = exports.npmPackage = exports.V6_BROADCAST_IP = exports.V4_BROADCAST_IP = void 0;
exports.inspect = exports.npmPackage = exports.V6_BROADCAST_IP = exports.V4_BROADCAST_IP = void 0;
exports.makeNonW3cCapsError = makeNonW3cCapsError;
exports.isServerCommandArgs = isServerCommandArgs;
exports.isSetupCommandArgs = isSetupCommandArgs;
exports.isExtensionCommandArgs = isExtensionCommandArgs;
exports.isDriverCommandArgs = isDriverCommandArgs;
exports.isPluginCommandArgs = isPluginCommandArgs;
exports.fetchInterfaces = fetchInterfaces;
exports.adler32 = adler32;
exports.parseCapsForInnerDriver = parseCapsForInnerDriver;
exports.insertAppiumPrefixes = insertAppiumPrefixes;
exports.getPackageVersion = getPackageVersion;
exports.pullSettings = pullSettings;
exports.removeAppiumPrefixes = removeAppiumPrefixes;
exports.adjustNodePath = adjustNodePath;
const lodash_1 = __importDefault(require("lodash"));

@@ -38,3 +52,2 @@ const logger_1 = __importDefault(require("./logger"));

}
exports.makeNonW3cCapsError = makeNonW3cCapsError;
/**

@@ -157,3 +170,2 @@ * Dumps to value to the console using `info` logger.

}
exports.parseCapsForInnerDriver = parseCapsForInnerDriver;
/**

@@ -170,3 +182,2 @@ * Takes a capabilities objects and prefixes capabilities with `appium:`

}
exports.insertAppiumPrefixes = insertAppiumPrefixes;
/**

@@ -180,3 +191,2 @@ * @template {Constraints} [C={}]

}
exports.removeAppiumPrefixes = removeAppiumPrefixes;
/**

@@ -199,3 +209,2 @@ * @param {string} key

}
exports.getPackageVersion = getPackageVersion;
/**

@@ -253,3 +262,2 @@ * Adjusts NODE_PATH environment variable,

}
exports.adjustNodePath = adjustNodePath;
/**

@@ -300,3 +308,2 @@ * Pulls the initial values of Appium settings from the given capabilities argument.

}
exports.pullSettings = pullSettings;
/**

@@ -311,3 +318,2 @@ * @template {CliCommand} [Cmd=ServerCommand]

}
exports.isServerCommandArgs = isServerCommandArgs;
/**

@@ -322,3 +328,2 @@ * @template {CliCommand} Cmd

}
exports.isSetupCommandArgs = isSetupCommandArgs;
/**

@@ -333,3 +338,2 @@ * @template {CliCommand} [Cmd=ServerCommand]

}
exports.isExtensionCommandArgs = isExtensionCommandArgs;
/**

@@ -344,3 +348,2 @@ * @template {CliCommand} Cmd

}
exports.isDriverCommandArgs = isDriverCommandArgs;
/**

@@ -355,3 +358,2 @@ * @template {CliCommand} Cmd

}
exports.isPluginCommandArgs = isPluginCommandArgs;
/**

@@ -378,3 +380,2 @@ * Fetches the list of matched network interfaces of the current host.

}
exports.fetchInterfaces = fetchInterfaces;
/**

@@ -437,3 +438,2 @@ * https://github.com/SheetJS/js-adler32

}
exports.adler32 = adler32;
/**

@@ -440,0 +440,0 @@ * @typedef {import('@appium/types').StringRecord} StringRecord

@@ -1,2 +0,1 @@

/// <reference types="node" />
import { ExtensionType, DriverType, DriverClass, PluginType, PluginClass } from '@appium/types';

@@ -3,0 +2,0 @@ export * from './manifest';

@@ -581,3 +581,5 @@ /* eslint-disable no-console */

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);

@@ -643,5 +645,12 @@ this.log.ok(`Successfully uninstalled ${this.type} '${installSpec}'`.green);

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};

@@ -648,0 +657,0 @@ } catch (err) {

@@ -145,3 +145,3 @@ import globalLog from '@appium/logger';

isLogColorEnabled(args) ? colorizeFormat : stripColorFormat,
format.printf(formatLogLine(args, true))
formatLog(args, true),
),

@@ -170,3 +170,3 @@ });

formatTimestamp(args),
format.printf(formatLogLine(args, false))
formatLog(args, false),
),

@@ -204,3 +204,3 @@ });

stripColorFormat,
format.printf(formatLogLine(args, false))
formatLog(args, false),
),

@@ -294,13 +294,26 @@ });

* @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) {

@@ -310,3 +323,3 @@ return `${args.logTimestamp ? `${info.timestamp} - ` : ''}${info.message}`;

return `${info.timestamp} ${info.message}`;
};
});
}

@@ -313,0 +326,0 @@

@@ -252,5 +252,8 @@ #!/usr/bin/env node

);
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),

@@ -261,3 +264,4 @@ );

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?`,
);

@@ -264,0 +268,0 @@ } else {

{
"name": "appium",
"version": "2.10.3",
"version": "2.11.0",
"description": "Automation for Apps.",

@@ -62,9 +62,9 @@ "keywords": [

"dependencies": {
"@appium/base-driver": "^9.10.3",
"@appium/base-plugin": "^2.2.39",
"@appium/docutils": "^1.0.15",
"@appium/logger": "^1.4.2",
"@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.3",
"@appium/types": "^0.20.3",
"@appium/support": "^5.1.0",
"@appium/types": "^0.21.0",
"@sidvind/better-ajv-errors": "2.1.3",

@@ -93,7 +93,7 @@ "@types/argparse": "2.0.16",

"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"

@@ -108,3 +108,3 @@ },

},
"gitHead": "89e5f7e8dbdc9caed68b9f3045e20d5f76255455"
"gitHead": "e8a838417a75464ebb8ce08584311f39afdd67bd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet