@appium/support
Advanced tools
Comparing version 5.0.3 to 5.1.0
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
/** | ||
@@ -15,3 +14,3 @@ * A particular console/logging class for Appium's CLI. | ||
*/ | ||
static symbolToColor: Record<keyof typeof symbols, keyof Extract<import('@colors/colors').Color, 'string'>>; | ||
static symbolToColor: Record<keyof typeof symbols, keyof Extract<import("@colors/colors").Color, "string">>; | ||
/** | ||
@@ -37,3 +36,3 @@ * | ||
*/ | ||
json(value: import('type-fest').JsonValue): void; | ||
json(value: import("type-fest").JsonValue): void; | ||
/** | ||
@@ -95,7 +94,7 @@ * General logging function. | ||
/** | ||
* Options for {@linkcode CliConsole }. | ||
* Options for {@linkcode CliConsole}. | ||
*/ | ||
export type ConsoleOpts = { | ||
/** | ||
* - If _truthy_, supress all output except JSON (use {@linkcode CliConsolejson }), which writes to `STDOUT`. | ||
* - If _truthy_, supress all output except JSON (use {@linkcode CliConsole#json}), which writes to `STDOUT`. | ||
*/ | ||
@@ -102,0 +101,0 @@ jsonMode?: boolean | undefined; |
@@ -35,3 +35,3 @@ /** | ||
} | ||
export type DoctorCheckResult = import('@appium/types').DoctorCheckResult; | ||
export type DoctorCheckResult = import("@appium/types").DoctorCheckResult; | ||
//# sourceMappingURL=doctor.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FixSkippedError = exports.nokOptional = exports.okOptional = exports.nok = exports.ok = void 0; | ||
exports.FixSkippedError = void 0; | ||
exports.ok = ok; | ||
exports.nok = nok; | ||
exports.okOptional = okOptional; | ||
exports.nokOptional = nokOptional; | ||
/** | ||
@@ -13,3 +17,2 @@ * A shortcut for a successful required doctor check | ||
} | ||
exports.ok = ok; | ||
/** | ||
@@ -24,3 +27,2 @@ * A shortcut for an unsuccessful required doctor check | ||
} | ||
exports.nok = nok; | ||
/** | ||
@@ -35,3 +37,2 @@ * A shortcut for a successful optional doctor check | ||
} | ||
exports.okOptional = okOptional; | ||
/** | ||
@@ -46,3 +47,2 @@ * A shortcut for an unsuccessful optional doctor check | ||
} | ||
exports.nokOptional = nokOptional; | ||
/** | ||
@@ -49,0 +49,0 @@ * Throw this exception in the fix() method |
@@ -32,3 +32,3 @@ /** | ||
*/ | ||
export const readPackageInDir: ((cwd: string) => Promise<import('read-pkg').NormalizedPackageJson | undefined>) & _.MemoizedFunction; | ||
export const readPackageInDir: ((cwd: string) => Promise<import("read-pkg").NormalizedPackageJson | undefined>) & _.MemoizedFunction; | ||
/** | ||
@@ -50,5 +50,5 @@ * Determines location of Appium's "home" dir | ||
export const resolveManifestPath: ((appiumHome?: string | undefined) => Promise<string>) & _.MemoizedFunction; | ||
export type NormalizedPackageJson = import('read-pkg').NormalizedPackageJson; | ||
export type NormalizedPackageJson = import("read-pkg").NormalizedPackageJson; | ||
import semver from 'semver'; | ||
import _ from 'lodash'; | ||
//# sourceMappingURL=env.d.ts.map |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveManifestPath = exports.resolveAppiumHome = exports.readPackageInDir = exports.findAppiumDependencyPackage = exports.hasAppiumDependency = exports.MANIFEST_RELATIVE_PATH = exports.MANIFEST_BASENAME = exports.DEFAULT_APPIUM_HOME = void 0; | ||
exports.resolveManifestPath = exports.resolveAppiumHome = exports.readPackageInDir = exports.findAppiumDependencyPackage = exports.MANIFEST_RELATIVE_PATH = exports.MANIFEST_BASENAME = exports.DEFAULT_APPIUM_HOME = void 0; | ||
exports.hasAppiumDependency = hasAppiumDependency; | ||
// @ts-check | ||
@@ -38,3 +39,2 @@ const lodash_1 = __importDefault(require("lodash")); | ||
} | ||
exports.hasAppiumDependency = hasAppiumDependency; | ||
/** | ||
@@ -41,0 +41,0 @@ * Given `cwd`, use `npm` to find the closest package _or workspace root_, and return the path if the root depends upon `appium`. |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
export default fs; | ||
@@ -9,4 +8,4 @@ /** | ||
export type mv = typeof mv; | ||
export type PathLike = import('fs').PathLike; | ||
export type ReadFn<TBuffer extends NodeJS.ArrayBufferView> = (fd: number, buffer: TBuffer | import('node:fs').ReadAsyncOptions<TBuffer>, offset?: number | undefined, length?: number | undefined, position?: number | null | undefined) => B<{ | ||
export type PathLike = import("fs").PathLike; | ||
export type ReadFn<TBuffer extends NodeJS.ArrayBufferView> = (fd: number, buffer: TBuffer | import("node:fs").ReadAsyncOptions<TBuffer>, offset?: number | undefined, length?: number | undefined, position?: number | null | undefined) => B<{ | ||
bytesRead: number; | ||
@@ -25,3 +24,3 @@ buffer: TBuffer; | ||
*/ | ||
export function hasAccess(path: import("fs").PathLike): Promise<boolean>; | ||
export function hasAccess(path: PathLike): Promise<boolean>; | ||
/** | ||
@@ -36,3 +35,3 @@ * Resolves `true` if `path` is executable; `false` otherwise. | ||
*/ | ||
export function isExecutable(path: import("fs").PathLike): Promise<boolean>; | ||
export function isExecutable(path: PathLike): Promise<boolean>; | ||
/** | ||
@@ -42,3 +41,3 @@ * Alias for {@linkcode fs.hasAccess} | ||
*/ | ||
export function exists(path: import("fs").PathLike): Promise<boolean>; | ||
export function exists(path: PathLike): Promise<boolean>; | ||
/** | ||
@@ -50,3 +49,3 @@ * Remove a directory and all its contents, recursively | ||
*/ | ||
export function rimraf(filepath: import("fs").PathLike): Promise<void>; | ||
export function rimraf(filepath: PathLike): Promise<void>; | ||
/** | ||
@@ -58,3 +57,3 @@ * Remove a directory and all its contents, recursively in sync | ||
*/ | ||
export function rimrafSync(filepath: import("fs").PathLike): void; | ||
export function rimrafSync(filepath: PathLike): void; | ||
/** | ||
@@ -83,7 +82,7 @@ * Like Node.js' `fsPromises.mkdir()`, but will _not_ reject if the directory already exists. | ||
*/ | ||
export function md5(filePath: import("fs").PathLike): Promise<string>; | ||
export function mv_1(from: string, to: string, opts?: mv.Options | undefined): B<void>; | ||
export function md5(filePath: PathLike): Promise<string>; | ||
let mv_1: (from: string, to: string, opts?: mv.Options) => B<void>; | ||
export { mv_1 as mv }; | ||
export { which }; | ||
export function glob(pattern: string, opts?: import("glob").GlobOptions | undefined): B<string[]>; | ||
export let glob: (pattern: string, opts?: import("glob").GlobOptions) => B<string[]>; | ||
export { sanitize as sanitizeName }; | ||
@@ -96,3 +95,3 @@ /** | ||
*/ | ||
export function hash(filePath: import("fs").PathLike, algorithm?: string | undefined): Promise<string>; | ||
export function hash(filePath: PathLike, algorithm?: string | undefined): Promise<string>; | ||
/** | ||
@@ -106,3 +105,3 @@ * Returns an `Walker` instance, which is a readable stream (and thusly an async iterator). | ||
*/ | ||
export function walk(dir: string, opts?: klaw.Options | undefined): klaw.Walker; | ||
export function walk(dir: string, opts?: klaw.Options | undefined): import("klaw").Walker; | ||
/** | ||
@@ -113,3 +112,3 @@ * Recursively create a directory. | ||
*/ | ||
export function mkdirp(dir: import("fs").PathLike): Promise<string | undefined>; | ||
export function mkdirp(dir: PathLike): Promise<string | undefined>; | ||
/** | ||
@@ -131,3 +130,3 @@ * Walks a directory given according to the parameters given. The callback will be invoked with a path joined with the dir parameter | ||
*/ | ||
export function readPackageJsonFrom(dir: string, opts?: readPkg.Options | undefined): readPkg.NormalizedPackageJson; | ||
export function readPackageJsonFrom(dir: string, opts?: readPkg.Options | undefined): import("read-pkg").NormalizedPackageJson; | ||
/** | ||
@@ -149,3 +148,3 @@ * Finds the project root directory from `dir`. | ||
export let lstat: typeof fsPromises.lstat; | ||
export let open: (path: PathLike, flags: import('fs').OpenMode, mode?: import('fs').Mode) => Promise<number>; | ||
export let open: (path: PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode) => Promise<number>; | ||
export let openFile: typeof fsPromises.open; | ||
@@ -152,0 +151,0 @@ export let readdir: typeof fsPromises.readdir; |
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
export function cropBase64Image(base64Image: string, rect: import('sharp').Region): Promise<string>; | ||
export function cropBase64Image(base64Image: string, rect: import("sharp").Region): Promise<string>; | ||
//# sourceMappingURL=image-util.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cropBase64Image = exports.requireSharp = void 0; | ||
exports.requireSharp = requireSharp; | ||
exports.cropBase64Image = cropBase64Image; | ||
let _sharp; | ||
@@ -21,3 +22,2 @@ /** | ||
} | ||
exports.requireSharp = requireSharp; | ||
/** | ||
@@ -35,3 +35,2 @@ * Crop the image by given rectangle (use base64 string as input and output) | ||
} | ||
exports.cropBase64Image = cropBase64Image; | ||
//# sourceMappingURL=image-util.js.map |
@@ -1,7 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="klaw" /> | ||
import * as tempDir from './tempdir'; | ||
@@ -32,18 +26,18 @@ import * as system from './system'; | ||
fs: { | ||
hasAccess(path: import("fs").PathLike): Promise<boolean>; | ||
isExecutable(path: import("fs").PathLike): Promise<boolean>; | ||
exists(path: import("fs").PathLike): Promise<boolean>; | ||
rimraf(filepath: import("fs").PathLike): Promise<void>; | ||
rimrafSync(filepath: import("fs").PathLike): void; | ||
hasAccess(path: PathLike): Promise<boolean>; | ||
isExecutable(path: PathLike): Promise<boolean>; | ||
exists(path: PathLike): Promise<boolean>; | ||
rimraf(filepath: PathLike): Promise<void>; | ||
rimrafSync(filepath: PathLike): void; | ||
mkdir(filepath: string | Buffer | URL, opts?: import("fs").MakeDirectoryOptions | undefined): Promise<string | undefined>; | ||
copyFile(source: string, destination: string, opts?: import("ncp").Options | undefined): Promise<void>; | ||
md5(filePath: import("fs").PathLike): Promise<string>; | ||
mv: (from: string, to: string, opts?: import("mv").Options | undefined) => import("bluebird")<void>; | ||
md5(filePath: PathLike): Promise<string>; | ||
mv: (from: string, to: string, opts?: import("mv").Options) => import("bluebird")<void>; | ||
which: typeof import("which"); | ||
glob: (pattern: string, opts?: import("glob").GlobOptions | undefined) => import("bluebird")<string[]>; | ||
glob: (pattern: string, opts?: import("glob").GlobOptions) => import("bluebird")<string[]>; | ||
sanitizeName: typeof import("sanitize-filename"); | ||
hash(filePath: import("fs").PathLike, algorithm?: string | undefined): Promise<string>; | ||
hash(filePath: PathLike, algorithm?: string | undefined): Promise<string>; | ||
walk(dir: string, opts?: import("klaw").Options | undefined): import("klaw").Walker; | ||
mkdirp(dir: import("fs").PathLike): Promise<string | undefined>; | ||
walkDir(dir: string, recursive: boolean, callback: import("./fs").WalkDirCallback): Promise<string | null>; | ||
mkdirp(dir: PathLike): Promise<string | undefined>; | ||
walkDir(dir: string, recursive: boolean, callback: WalkDirCallback): Promise<string | null>; | ||
readPackageJsonFrom(dir: string, opts?: import("read-pkg").Options | undefined): import("read-pkg").NormalizedPackageJson; | ||
@@ -59,3 +53,3 @@ findRoot(dir: string): string; | ||
lstat: typeof import("fs/promises").lstat; | ||
open: (path: import("fs").PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode | undefined) => Promise<number>; | ||
open: (path: import("./fs").PathLike, flags: import("fs").OpenMode, mode?: import("fs").Mode) => Promise<number>; | ||
openFile: typeof import("fs/promises").open; | ||
@@ -80,3 +74,3 @@ readdir: typeof import("fs/promises").readdir; | ||
plist: typeof plist; | ||
mkdirp: (dir: import("fs").PathLike) => Promise<string | undefined>; | ||
mkdirp: (dir: PathLike) => Promise<string | undefined>; | ||
logger: typeof logger; | ||
@@ -83,0 +77,0 @@ process: typeof process; |
@@ -8,8 +8,8 @@ /** | ||
/** @type {import('@appium/types').AppiumLoggerLevel[]} */ | ||
export const LEVELS: import('@appium/types').AppiumLoggerLevel[]; | ||
export const LEVELS: import("@appium/types").AppiumLoggerLevel[]; | ||
export const log: import("@appium/types").AppiumLogger; | ||
export default log; | ||
export type AppiumLoggerPrefix = import('@appium/types').AppiumLoggerPrefix; | ||
export type AppiumLogger = import('@appium/types').AppiumLogger; | ||
export type AppiumLoggerLevel = import('@appium/types').AppiumLoggerLevel; | ||
export type AppiumLoggerPrefix = import("@appium/types").AppiumLoggerPrefix; | ||
export type AppiumLogger = import("@appium/types").AppiumLogger; | ||
export type AppiumLoggerLevel = import("@appium/types").AppiumLoggerLevel; | ||
//# sourceMappingURL=logging.d.ts.map |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLogger = exports.log = exports.LEVELS = void 0; | ||
exports.log = exports.LEVELS = void 0; | ||
exports.getLogger = getLogger; | ||
const logger_1 = __importDefault(require("@appium/logger")); | ||
@@ -42,9 +43,2 @@ const lodash_1 = __importDefault(require("lodash")); | ||
prefix, | ||
/** | ||
* Logs given arguments at the error level and returns | ||
* the error object. | ||
* | ||
* @param {...any} args | ||
* @returns {Error} | ||
*/ | ||
errorWithException(/** @type {any[]} */ ...args) { | ||
@@ -55,10 +49,9 @@ this.error(...args); | ||
}, | ||
/** | ||
* @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); | ||
}, | ||
}; | ||
@@ -93,3 +86,2 @@ // allow access to the level of the underlying logger | ||
} | ||
exports.getLogger = getLogger; | ||
/** | ||
@@ -96,0 +88,0 @@ * |
@@ -1,3 +0,2 @@ | ||
/// <reference types="node" /> | ||
export const mkdirp: (dir: import("fs").PathLike) => Promise<string | undefined>; | ||
export const mkdirp: (dir: PathLike) => Promise<string | undefined>; | ||
//# sourceMappingURL=mkdirp.d.ts.map |
/** | ||
* Common options for {@linkcode uploadFile } and {@linkcode downloadFile }. | ||
* Common options for {@linkcode uploadFile} and {@linkcode downloadFile}. | ||
*/ | ||
@@ -16,7 +16,7 @@ export type NetOptions = { | ||
/** | ||
* Specific options for {@linkcode downloadFile }. | ||
* Specific options for {@linkcode downloadFile}. | ||
*/ | ||
export type DownloadOptions = { | ||
/** | ||
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS } | ||
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS} | ||
*/ | ||
@@ -30,3 +30,3 @@ timeout?: number | undefined; | ||
/** | ||
* Basic auth credentials; used by {@linkcode NetOptions }. | ||
* Basic auth credentials; used by {@linkcode NetOptions}. | ||
*/ | ||
@@ -44,3 +44,3 @@ export type AuthCredentials = { | ||
/** | ||
* This type is used in {@linkcode uploadFile } if the remote location uses the `ftp` protocol, and distinguishes the type from {@linkcode HttpUploadOptions }. | ||
* This type is used in {@linkcode uploadFile} if the remote location uses the `ftp` protocol, and distinguishes the type from {@linkcode HttpUploadOptions}. | ||
*/ | ||
@@ -55,3 +55,3 @@ export type NotHttpUploadOptions = { | ||
/** | ||
* Specific options for {@linkcode uploadFile } if the remote location uses the `http(s)` protocol | ||
* Specific options for {@linkcode uploadFile} if the remote location uses the `http(s)` protocol | ||
*/ | ||
@@ -68,3 +68,3 @@ export type HttpUploadOptions = { | ||
/** | ||
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS } | ||
* - The actual request timeout in milliseconds; defaults to {@linkcode DEFAULT_TIMEOUT_MS} | ||
*/ | ||
@@ -71,0 +71,0 @@ timeout?: number | undefined; |
@@ -6,3 +6,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.downloadFile = exports.uploadFile = void 0; | ||
exports.uploadFile = uploadFile; | ||
exports.downloadFile = downloadFile; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
@@ -195,3 +196,2 @@ const fs_1 = __importDefault(require("./fs")); | ||
} | ||
exports.uploadFile = uploadFile; | ||
/** | ||
@@ -257,3 +257,2 @@ * Downloads the given file via HTTP(S) | ||
} | ||
exports.downloadFile = downloadFile; | ||
/** | ||
@@ -260,0 +259,0 @@ * Common options for {@linkcode uploadFile} and {@linkcode downloadFile}. |
@@ -6,3 +6,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getModuleRootSync = exports.deepFreeze = exports.getObjectId = exports.getObjectSize = exports.requirePackage = void 0; | ||
exports.requirePackage = requirePackage; | ||
exports.getObjectSize = getObjectSize; | ||
exports.getObjectId = getObjectId; | ||
exports.deepFreeze = deepFreeze; | ||
exports.getModuleRootSync = getModuleRootSync; | ||
const system_1 = require("./system"); | ||
@@ -80,3 +84,2 @@ const logger_1 = __importDefault(require("./logger")); | ||
} | ||
exports.requirePackage = requirePackage; | ||
function extractAllProperties(obj) { | ||
@@ -155,3 +158,2 @@ const stringProperties = []; | ||
} | ||
exports.getObjectSize = getObjectSize; | ||
const OBJECTS_MAPPING = new WeakMap(); | ||
@@ -170,3 +172,2 @@ /** | ||
} | ||
exports.getObjectId = getObjectId; | ||
/** | ||
@@ -201,3 +202,2 @@ * Perform deep freeze of the given object (e. g. | ||
} | ||
exports.deepFreeze = deepFreeze; | ||
/** | ||
@@ -229,3 +229,2 @@ * Tries to synchronously detect the absolute path to the folder | ||
} | ||
exports.getModuleRootSync = getModuleRootSync; | ||
//# sourceMappingURL=node.js.map |
@@ -82,7 +82,7 @@ /** | ||
*/ | ||
getPackageInfo(pkg: string, entries?: string[] | undefined): Promise<import('@appium/types').StringRecord>; | ||
getPackageInfo(pkg: string, entries?: string[] | undefined): Promise<import("@appium/types").StringRecord>; | ||
} | ||
export const npm: NPM; | ||
/** | ||
* Options for {@link NPM.installPackage } | ||
* Options for {@link NPM.installPackage} | ||
*/ | ||
@@ -100,3 +100,3 @@ export type InstallPackageOpts = { | ||
/** | ||
* Options for {@link NPM.exec } | ||
* Options for {@link NPM.exec} | ||
*/ | ||
@@ -117,3 +117,3 @@ export type ExecOpts = { | ||
}; | ||
export type TeenProcessExecOptions = import('teen_process').TeenProcessExecOptions; | ||
export type TeenProcessExecOptions = import("teen_process").TeenProcessExecOptions; | ||
export type NpmInstallReceipt = { | ||
@@ -127,4 +127,4 @@ /** | ||
*/ | ||
pkg: import('type-fest').PackageJson; | ||
pkg: import("type-fest").PackageJson; | ||
}; | ||
//# sourceMappingURL=npm.d.ts.map |
@@ -6,3 +6,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseBinaryPlist = exports.createBinaryPlist = exports.updatePlistFile = exports.createPlist = exports.parsePlist = exports.parsePlistFile = void 0; | ||
exports.parsePlistFile = parsePlistFile; | ||
exports.parsePlist = parsePlist; | ||
exports.createPlist = createPlist; | ||
exports.updatePlistFile = updatePlistFile; | ||
exports.createBinaryPlist = createBinaryPlist; | ||
exports.parseBinaryPlist = parseBinaryPlist; | ||
const plist_1 = __importDefault(require("plist")); | ||
@@ -70,3 +75,2 @@ const bplist_creator_1 = __importDefault(require("bplist-creator")); | ||
} | ||
exports.parsePlistFile = parsePlistFile; | ||
/** | ||
@@ -100,3 +104,2 @@ * Updates a plist file with the given fields | ||
} | ||
exports.updatePlistFile = updatePlistFile; | ||
/** | ||
@@ -110,3 +113,2 @@ * Creates a binary plist Buffer from an object | ||
} | ||
exports.createBinaryPlist = createBinaryPlist; | ||
/** | ||
@@ -119,3 +121,2 @@ * Parses a Buffer into an Object | ||
} | ||
exports.parseBinaryPlist = parseBinaryPlist; | ||
function getXmlPlist(data) { | ||
@@ -155,3 +156,2 @@ if (lodash_1.default.isString(data) && data.startsWith(PLIST_IDENTIFIER.TEXT)) { | ||
} | ||
exports.createPlist = createPlist; | ||
/** | ||
@@ -174,3 +174,2 @@ * Parses an buffer or a string to a JS object a plist from an object | ||
} | ||
exports.parsePlist = parsePlist; | ||
//# sourceMappingURL=plist.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.killProcess = exports.getProcessIds = void 0; | ||
exports.getProcessIds = getProcessIds; | ||
exports.killProcess = killProcess; | ||
const teen_process_1 = require("teen_process"); | ||
@@ -29,3 +30,2 @@ /* | ||
} | ||
exports.getProcessIds = getProcessIds; | ||
async function killProcess(appName, force = false) { | ||
@@ -48,3 +48,2 @@ let pids = await getProcessIds(appName); | ||
} | ||
exports.killProcess = killProcess; | ||
//# sourceMappingURL=process.js.map |
@@ -6,3 +6,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.macOsxVersion = exports.arch = exports.isOSWin64 = exports.isLinux = exports.isMac = exports.isWindows = void 0; | ||
exports.isWindows = isWindows; | ||
exports.isMac = isMac; | ||
exports.isLinux = isLinux; | ||
exports.isOSWin64 = isOSWin64; | ||
exports.arch = arch; | ||
exports.macOsxVersion = macOsxVersion; | ||
const teen_process_1 = require("teen_process"); | ||
@@ -15,15 +20,11 @@ const lodash_1 = __importDefault(require("lodash")); | ||
} | ||
exports.isWindows = isWindows; | ||
function isMac() { | ||
return os_1.default.type() === 'Darwin'; | ||
} | ||
exports.isMac = isMac; | ||
function isLinux() { | ||
return !isWindows() && !isMac(); | ||
} | ||
exports.isLinux = isLinux; | ||
function isOSWin64() { | ||
return process.arch === 'x64' || lodash_1.default.has(process.env, 'PROCESSOR_ARCHITEW6432'); | ||
} | ||
exports.isOSWin64 = isOSWin64; | ||
async function arch() { | ||
@@ -39,3 +40,2 @@ if (isLinux() || isMac()) { | ||
} | ||
exports.arch = arch; | ||
async function macOsxVersion() { | ||
@@ -55,3 +55,2 @@ let stdout; | ||
} | ||
exports.macOsxVersion = macOsxVersion; | ||
//# sourceMappingURL=system.js.map |
@@ -6,3 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.staticDir = exports.openDir = exports.path = exports.open = void 0; | ||
exports.openDir = void 0; | ||
exports.open = open; | ||
exports.path = path; | ||
exports.staticDir = staticDir; | ||
/* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
@@ -57,3 +60,2 @@ const fs_1 = __importDefault(require("./fs")); | ||
} | ||
exports.path = path; | ||
/** | ||
@@ -82,3 +84,2 @@ * @typedef OpenedAffixes | ||
} | ||
exports.open = open; | ||
/** | ||
@@ -129,3 +130,2 @@ * | ||
} | ||
exports.staticDir = staticDir; | ||
//# sourceMappingURL=tempdir.js.map |
@@ -37,3 +37,3 @@ /** | ||
*/ | ||
export type NonEmptyString<T extends string> = T extends '' ? never : T; | ||
export type NonEmptyString<T extends string> = T extends "" ? never : T; | ||
/** | ||
@@ -65,3 +65,3 @@ * return true if the the value is not `undefined`, `null`, or `NaN`. | ||
*/ | ||
export function wrapElement(elementId: string): import('@appium/types').Element; | ||
export function wrapElement(elementId: string): import("@appium/types").Element; | ||
/** | ||
@@ -74,3 +74,3 @@ * Removes the wrapper from element, if it exists. | ||
*/ | ||
export function unwrapElement(el: import('@appium/types').Element | string): string; | ||
export function unwrapElement(el: import("@appium/types").Element | string): string; | ||
export function filterObject(obj: any, predicate: any): any; | ||
@@ -77,0 +77,0 @@ /** |
@@ -6,3 +6,24 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLockFileGuard = exports.shellParse = exports.uuidV5 = exports.uuidV4 = exports.uuidV3 = exports.uuidV1 = exports.toInMemoryBase64 = exports.KiB = exports.MiB = exports.GiB = exports.pluralize = exports.jsonStringify = exports.quote = exports.coerceVersion = exports.compareVersions = exports.isSameDestination = exports.W3C_WEB_ELEMENT_IDENTIFIER = exports.isSubPath = exports.toReadableSizeString = exports.filterObject = exports.unwrapElement = exports.wrapElement = exports.safeJsonParse = exports.multiResolve = exports.cancellableDelay = exports.localIp = exports.escapeSpecialChars = exports.escapeSpace = exports.hasValue = exports.hasContent = void 0; | ||
exports.shellParse = exports.uuidV5 = exports.uuidV4 = exports.uuidV3 = exports.uuidV1 = exports.KiB = exports.MiB = exports.GiB = exports.W3C_WEB_ELEMENT_IDENTIFIER = void 0; | ||
exports.hasContent = hasContent; | ||
exports.hasValue = hasValue; | ||
exports.escapeSpace = escapeSpace; | ||
exports.escapeSpecialChars = escapeSpecialChars; | ||
exports.localIp = localIp; | ||
exports.cancellableDelay = cancellableDelay; | ||
exports.multiResolve = multiResolve; | ||
exports.safeJsonParse = safeJsonParse; | ||
exports.wrapElement = wrapElement; | ||
exports.unwrapElement = unwrapElement; | ||
exports.filterObject = filterObject; | ||
exports.toReadableSizeString = toReadableSizeString; | ||
exports.isSubPath = isSubPath; | ||
exports.isSameDestination = isSameDestination; | ||
exports.compareVersions = compareVersions; | ||
exports.coerceVersion = coerceVersion; | ||
exports.quote = quote; | ||
exports.jsonStringify = jsonStringify; | ||
exports.pluralize = pluralize; | ||
exports.toInMemoryBase64 = toInMemoryBase64; | ||
exports.getLockFileGuard = getLockFileGuard; | ||
const bluebird_1 = __importDefault(require("bluebird")); | ||
@@ -41,3 +62,2 @@ const lodash_1 = __importDefault(require("lodash")); | ||
} | ||
exports.hasContent = hasContent; | ||
/** | ||
@@ -58,3 +78,2 @@ * return true if the the value is not `undefined`, `null`, or `NaN`. | ||
} | ||
exports.hasValue = hasValue; | ||
// escape spaces in string, for commandline calls | ||
@@ -64,3 +83,2 @@ function escapeSpace(str) { | ||
} | ||
exports.escapeSpace = escapeSpace; | ||
function escapeSpecialChars(str, quoteEscape) { | ||
@@ -89,3 +107,2 @@ if (typeof str !== 'string') { | ||
} | ||
exports.escapeSpecialChars = escapeSpecialChars; | ||
function localIp() { | ||
@@ -102,3 +119,2 @@ let ip = lodash_1.default.chain(os_1.default.networkInterfaces()) | ||
} | ||
exports.localIp = localIp; | ||
/* | ||
@@ -127,7 +143,5 @@ * Creates a promise that is cancellable, and will timeout | ||
} | ||
exports.cancellableDelay = cancellableDelay; | ||
function multiResolve(roots, ...args) { | ||
return roots.map((root) => path_1.default.resolve(root, ...args)); | ||
} | ||
exports.multiResolve = multiResolve; | ||
/** | ||
@@ -148,3 +162,2 @@ * Parses an object if possible. Otherwise returns the object without parsing. | ||
} | ||
exports.safeJsonParse = safeJsonParse; | ||
/** | ||
@@ -179,3 +192,2 @@ * Stringifies the object passed in, converting Buffers into Strings for better | ||
} | ||
exports.jsonStringify = jsonStringify; | ||
/** | ||
@@ -196,3 +208,2 @@ * Removes the wrapper from element, if it exists. | ||
} | ||
exports.unwrapElement = unwrapElement; | ||
/** | ||
@@ -209,3 +220,2 @@ * | ||
} | ||
exports.wrapElement = wrapElement; | ||
/* | ||
@@ -237,3 +247,2 @@ * Returns object consisting of all properties in the original element | ||
} | ||
exports.filterObject = filterObject; | ||
/** | ||
@@ -264,3 +273,2 @@ * Converts number of bytes to a readable size string. | ||
} | ||
exports.toReadableSizeString = toReadableSizeString; | ||
/** | ||
@@ -287,3 +295,2 @@ * Checks whether the given path is a subpath of the | ||
} | ||
exports.isSubPath = isSubPath; | ||
/** | ||
@@ -312,3 +319,2 @@ * Checks whether the given paths are pointing to the same file system | ||
} | ||
exports.isSameDestination = isSameDestination; | ||
/** | ||
@@ -332,3 +338,2 @@ * Coerces the given number/string to a valid version string | ||
} | ||
exports.coerceVersion = coerceVersion; | ||
const SUPPORTED_OPERATORS = ['==', '!=', '>', '<', '>=', '<=', '=']; | ||
@@ -357,3 +362,2 @@ /** | ||
} | ||
exports.compareVersions = compareVersions; | ||
/** | ||
@@ -369,3 +373,2 @@ * Add appropriate quotes to command arguments. See https://github.com/substack/node-shell-quote | ||
} | ||
exports.quote = quote; | ||
/** | ||
@@ -396,3 +399,2 @@ * @typedef PluralizeOptions | ||
} | ||
exports.pluralize = pluralize; | ||
/** | ||
@@ -455,3 +457,2 @@ * @typedef EncodingOptions | ||
} | ||
exports.toInMemoryBase64 = toInMemoryBase64; | ||
/** | ||
@@ -522,3 +523,2 @@ * @typedef LockFileOptions | ||
} | ||
exports.getLockFileGuard = getLockFileGuard; | ||
/** | ||
@@ -525,0 +525,0 @@ * A `string` which is never `''`. |
@@ -6,3 +6,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toArchive = exports.assertValidZip = exports._extractEntryTo = exports.toInMemoryZip = exports.readEntries = exports.extractAllTo = void 0; | ||
exports.extractAllTo = extractAllTo; | ||
exports.readEntries = readEntries; | ||
exports.toInMemoryZip = toInMemoryZip; | ||
exports._extractEntryTo = _extractEntryTo; | ||
exports.assertValidZip = assertValidZip; | ||
exports.toArchive = toArchive; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
@@ -197,3 +202,2 @@ const bluebird_1 = __importDefault(require("bluebird")); | ||
} | ||
exports.extractAllTo = extractAllTo; | ||
/** | ||
@@ -274,3 +278,2 @@ * Executes system unzip (e.g., `/usr/bin/unzip`). If available, it is | ||
} | ||
exports._extractEntryTo = _extractEntryTo; | ||
/** | ||
@@ -313,3 +316,2 @@ * @typedef ZipEntry | ||
} | ||
exports.readEntries = readEntries; | ||
/** | ||
@@ -416,3 +418,2 @@ * @typedef ZipOptions | ||
} | ||
exports.toInMemoryZip = toInMemoryZip; | ||
/** | ||
@@ -447,3 +448,2 @@ * Verifies whether the given file is a valid ZIP archive | ||
} | ||
exports.assertValidZip = assertValidZip; | ||
/** | ||
@@ -493,3 +493,2 @@ * @typedef ZipCompressionOptions | ||
} | ||
exports.toArchive = toArchive; | ||
/** | ||
@@ -496,0 +495,0 @@ * Finds and memoizes the full path to the given executable. |
@@ -38,9 +38,2 @@ import globalLog from '@appium/logger'; | ||
prefix, | ||
/** | ||
* Logs given arguments at the error level and returns | ||
* the error object. | ||
* | ||
* @param {...any} args | ||
* @returns {Error} | ||
*/ | ||
errorWithException (/** @type {any[]} */ ...args) { | ||
@@ -51,10 +44,11 @@ this.error(...args); | ||
}, | ||
/** | ||
* @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); | ||
}, | ||
}; | ||
@@ -61,0 +55,0 @@ // allow access to the level of the underlying logger |
{ | ||
"name": "@appium/support", | ||
"version": "5.0.3", | ||
"version": "5.1.0", | ||
"description": "Support libs used across appium packages", | ||
@@ -44,5 +44,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@appium/logger": "^1.4.2", | ||
"@appium/logger": "^1.5.0", | ||
"@appium/tsconfig": "^0.3.3", | ||
"@appium/types": "^0.20.3", | ||
"@appium/types": "^0.21.0", | ||
"@colors/colors": "1.6.0", | ||
@@ -62,3 +62,3 @@ "@types/archiver": "6.0.2", | ||
"@types/teen_process": "2.0.4", | ||
"@types/uuid": "9.0.8", | ||
"@types/uuid": "10.0.0", | ||
"@types/which": "3.0.4", | ||
@@ -73,3 +73,3 @@ "archiver": "7.0.1", | ||
"get-stream": "6.0.1", | ||
"glob": "10.4.1", | ||
"glob": "10.4.2", | ||
"jsftp": "2.1.3", | ||
@@ -94,5 +94,5 @@ "klaw": "4.1.0", | ||
"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", | ||
@@ -111,3 +111,3 @@ "yauzl": "3.1.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
409149
8334
+ Added@appium/types@0.21.3(transitive)
+ Added@types/uuid@10.0.0(transitive)
+ Added@types/ws@8.5.12(transitive)
+ Addedglob@10.4.2(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedteen_process@2.1.6(transitive)
+ Addedtype-fest@4.20.14.26.1(transitive)
+ Addeduuid@10.0.0(transitive)
- Removed@appium/types@0.20.3(transitive)
- Removed@types/uuid@9.0.8(transitive)
- Removed@types/ws@8.5.10(transitive)
- Removedglob@10.4.1(transitive)
- Removedresolve@1.22.9(transitive)
- Removedteen_process@2.1.4(transitive)
- Removedtype-fest@4.20.0(transitive)
- Removeduuid@9.0.1(transitive)
Updated@appium/logger@^1.5.0
Updated@appium/types@^0.21.0
Updated@types/uuid@10.0.0
Updatedglob@10.4.2
Updatedteen_process@2.1.6
Updatedtype-fest@4.20.1
Updateduuid@10.0.0