@wdio/utils
Advanced tools
Comparing version 8.36.0 to 8.36.1
@@ -5,3 +5,3 @@ import webdriverMonad from './monad.js'; | ||
import { initializeWorkerService, initializeLauncherService } from './initializeServices.js'; | ||
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability, getBrowserObject } from './utils.js'; | ||
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability, getBrowserObject, enableFileLogging } from './utils.js'; | ||
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js'; | ||
@@ -12,3 +12,3 @@ import * as asyncIterators from './pIteration.js'; | ||
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js'; | ||
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, getBrowserObject, asyncIterators, | ||
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, getBrowserObject, enableFileLogging, asyncIterators, | ||
/** | ||
@@ -15,0 +15,0 @@ * runner shim |
@@ -6,3 +6,3 @@ /* istanbul ignore file */ | ||
import { initializeWorkerService, initializeLauncherService } from './initializeServices.js'; | ||
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability, getBrowserObject } from './utils.js'; | ||
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, sleep, isAppiumCapability, getBrowserObject, enableFileLogging, } from './utils.js'; | ||
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js'; | ||
@@ -13,3 +13,3 @@ import * as asyncIterators from './pIteration.js'; | ||
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js'; | ||
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, getBrowserObject, asyncIterators, | ||
export { startWebDriver, initializePlugin, initializeLauncherService, initializeWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, sleep, isAppiumCapability, getBrowserObject, enableFileLogging, asyncIterators, | ||
/** | ||
@@ -16,0 +16,0 @@ * runner shim |
@@ -95,2 +95,7 @@ import type { Options, Services } from '@wdio/types'; | ||
export declare function getBrowserObject(elem: WebdriverIO.Element | WebdriverIO.Browser): WebdriverIO.Browser; | ||
/** | ||
* Enables logging to a file in a specified directory. | ||
* @param {string} outputDir Directory containing the log file | ||
*/ | ||
export declare function enableFileLogging(outputDir?: string): Promise<void>; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -0,1 +1,4 @@ | ||
/// <reference types="@wdio/globals/types" /> | ||
import fs from 'node:fs/promises'; | ||
import path from 'node:path'; | ||
import { SUPPORTED_BROWSERNAMES, DEFAULT_PROTOCOL, DEFAULT_HOSTNAME, DEFAULT_PATH } from './constants.js'; | ||
@@ -313,1 +316,12 @@ const SCREENSHOT_REPLACEMENT = '"<Screenshot[base64]>"'; | ||
} | ||
/** | ||
* Enables logging to a file in a specified directory. | ||
* @param {string} outputDir Directory containing the log file | ||
*/ | ||
export async function enableFileLogging(outputDir) { | ||
if (!outputDir) { | ||
return; | ||
} | ||
await fs.mkdir(path.join(outputDir), { recursive: true }); | ||
process.env.WDIO_LOG_PATH = path.join(outputDir, 'wdio.log'); | ||
} |
{ | ||
"name": "@wdio/utils", | ||
"version": "8.36.0", | ||
"version": "8.36.1", | ||
"description": "A WDIO helper utility to provide several utility functions used across the project.", | ||
@@ -42,3 +42,3 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@wdio/logger": "8.28.0", | ||
"@wdio/types": "8.36.0", | ||
"@wdio/types": "8.36.1", | ||
"decamelize": "^6.0.0", | ||
@@ -58,3 +58,3 @@ "deepmerge-ts": "^5.1.0", | ||
}, | ||
"gitHead": "bc4e87f18f8f3cd8293734264f3ffb1e6a194cd7" | ||
"gitHead": "6c4a9745052c29d13b73ac622dfda387c884ffd8" | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
164794
3399
6
+ Added@wdio/types@8.36.1(transitive)
- Removed@wdio/types@8.36.0(transitive)
Updated@wdio/types@8.36.1