appium-webdriveragent
Advanced tools
Comparing version 8.7.5 to 8.7.6
@@ -15,3 +15,2 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const os_1 = require("os"); | ||
const constants_1 = require("./constants"); | ||
@@ -29,2 +28,7 @@ const DEFAULT_SIGNING_ID = 'iPhone Developer'; | ||
]; | ||
const IGNORED_ERRORS_PATTERN = new RegExp('(' + | ||
IGNORED_ERRORS | ||
.map((errStr) => lodash_1.default.escapeRegExp(errStr)) | ||
.join('|') + | ||
')'); | ||
const RUNNER_SCHEME_TV = 'WebDriverAgentRunner_tvOS'; | ||
@@ -279,9 +283,10 @@ const LIB_SCHEME_TV = 'WebDriverAgentLib_tvOS'; | ||
this.log.debug(`${logMsg}. To change this, use 'showXcodeLog' desired capability`); | ||
xcodebuild.on('output', (stdout, stderr) => { | ||
let out = stdout || stderr; | ||
const onStreamLine = (/** @type {string} */ line) => { | ||
if (this.showXcodeLog === false || IGNORED_ERRORS_PATTERN.test(line)) { | ||
return; | ||
} | ||
// if we have an error we want to output the logs | ||
// otherwise the failure is inscrutible | ||
// but do not log permission errors from trying to write to attachments folder | ||
const ignoreError = IGNORED_ERRORS.some((x) => out.includes(x)); | ||
if (this.showXcodeLog !== false && out.includes('Error Domain=') && !ignoreError) { | ||
if (line.includes('Error Domain=')) { | ||
logXcodeOutput = true; | ||
@@ -291,9 +296,9 @@ // handle case where xcode returns 0 but is failing | ||
} | ||
// do not log permission errors from trying to write to attachments folder | ||
if (logXcodeOutput && !ignoreError) { | ||
for (const line of out.split(os_1.EOL)) { | ||
xcodeLog.error(line); | ||
} | ||
if (logXcodeOutput) { | ||
xcodeLog.info(line); | ||
} | ||
}); | ||
}; | ||
for (const streamName of ['stderr', 'stdout']) { | ||
xcodebuild.on(`line-${streamName}`, onStreamLine); | ||
} | ||
return xcodebuild; | ||
@@ -300,0 +305,0 @@ } |
@@ -0,1 +1,7 @@ | ||
## [8.7.6](https://github.com/appium/WebDriverAgent/compare/v8.7.5...v8.7.6) (2024-07-02) | ||
### Miscellaneous Chores | ||
* Simplify xcodebuild lines monitoring ([#916](https://github.com/appium/WebDriverAgent/issues/916)) ([87678f2](https://github.com/appium/WebDriverAgent/commit/87678f260c98b3a3bc3d37017e9ef39098ccb3c4)) | ||
## [8.7.5](https://github.com/appium/WebDriverAgent/compare/v8.7.4...v8.7.5) (2024-06-26) | ||
@@ -2,0 +8,0 @@ |
@@ -13,3 +13,2 @@ import { retryInterval } from 'asyncbox'; | ||
import path from 'path'; | ||
import { EOL } from 'os'; | ||
import { WDA_RUNNER_BUNDLE_ID } from './constants'; | ||
@@ -30,2 +29,9 @@ | ||
]; | ||
const IGNORED_ERRORS_PATTERN = new RegExp( | ||
'(' + | ||
IGNORED_ERRORS | ||
.map((errStr) => _.escapeRegExp(errStr)) | ||
.join('|') + | ||
')' | ||
); | ||
@@ -329,23 +335,22 @@ const RUNNER_SCHEME_TV = 'WebDriverAgentRunner_tvOS'; | ||
this.log.debug(`${logMsg}. To change this, use 'showXcodeLog' desired capability`); | ||
xcodebuild.on('output', (stdout, stderr) => { | ||
let out = stdout || stderr; | ||
const onStreamLine = (/** @type {string} */ line) => { | ||
if (this.showXcodeLog === false || IGNORED_ERRORS_PATTERN.test(line)) { | ||
return; | ||
} | ||
// if we have an error we want to output the logs | ||
// otherwise the failure is inscrutible | ||
// but do not log permission errors from trying to write to attachments folder | ||
const ignoreError = IGNORED_ERRORS.some((x) => out.includes(x)); | ||
if (this.showXcodeLog !== false && out.includes('Error Domain=') && !ignoreError) { | ||
if (line.includes('Error Domain=')) { | ||
logXcodeOutput = true; | ||
// handle case where xcode returns 0 but is failing | ||
this._didBuildFail = true; | ||
} | ||
// do not log permission errors from trying to write to attachments folder | ||
if (logXcodeOutput && !ignoreError) { | ||
for (const line of out.split(EOL)) { | ||
xcodeLog.error(line); | ||
} | ||
if (logXcodeOutput) { | ||
xcodeLog.info(line); | ||
} | ||
}); | ||
}; | ||
for (const streamName of ['stderr', 'stdout']) { | ||
xcodebuild.on(`line-${streamName}`, onStreamLine); | ||
} | ||
@@ -352,0 +357,0 @@ return xcodebuild; |
{ | ||
"name": "appium-webdriveragent", | ||
"version": "8.7.5", | ||
"version": "8.7.6", | ||
"description": "Package bundling WebDriverAgent", | ||
@@ -51,3 +51,2 @@ "main": "./build/index.js", | ||
"devDependencies": { | ||
"@appium/eslint-config-appium": "^8.0.4", | ||
"@appium/eslint-config-appium-ts": "^0.x", | ||
@@ -90,3 +89,3 @@ "@appium/test-support": "^3.0.0", | ||
"source-map-support": "^0.x", | ||
"teen_process": "^2.0.0" | ||
"teen_process": "^2.2.0" | ||
}, | ||
@@ -93,0 +92,0 @@ "files": [ |
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
2509188
24
3860
+ Added@types/node@22.13.10(transitive)
+ Addedaxios@1.8.2(transitive)
+ Addedcall-bound@1.0.4(transitive)
- Removed@types/node@22.13.8(transitive)
- Removedaxios@1.8.1(transitive)
- Removedcall-bound@1.0.3(transitive)
Updatedteen_process@^2.2.0