node-simctl
Advanced tools
Comparing version 3.5.0 to 3.5.1
@@ -31,2 +31,3 @@ 'use strict'; | ||
var executingFunction = arguments.length <= 4 || arguments[4] === undefined ? _teen_process.exec : arguments[4]; | ||
var logErrors = arguments.length <= 5 || arguments[5] === undefined ? true : arguments[5]; | ||
return _regeneratorRuntime.async(function simCommand$(context$1$0) { | ||
@@ -54,2 +55,10 @@ while (1) switch (context$1$0.prev = context$1$0.next) { | ||
if (logErrors) { | ||
context$1$0.next = 14; | ||
break; | ||
} | ||
throw context$1$0.t0; | ||
case 14: | ||
if (context$1$0.t0.stderr) { | ||
@@ -61,3 +70,3 @@ log.errorAndThrow('simctl error running \'' + command + '\': ' + context$1$0.t0.stderr.trim()); | ||
case 11: | ||
case 15: | ||
case 'end': | ||
@@ -72,2 +81,3 @@ return context$1$0.stop(); | ||
var env = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; | ||
var logErrors = arguments.length <= 4 || arguments[4] === undefined ? true : arguments[4]; | ||
return _regeneratorRuntime.async(function simExec$(context$1$0) { | ||
@@ -94,3 +104,3 @@ var _this = this; | ||
}, null, _this); | ||
})); | ||
}, logErrors)); | ||
@@ -264,2 +274,3 @@ case 2: | ||
function getAppContainer(udid, bundleId) { | ||
var logErrors = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
return _regeneratorRuntime.async(function getAppContainer$(context$1$0) { | ||
@@ -269,3 +280,3 @@ while (1) switch (context$1$0.prev = context$1$0.next) { | ||
context$1$0.next = 2; | ||
return _regeneratorRuntime.awrap(simExec('get_app_container', 0, [udid, bundleId]).stdout.trim()); | ||
return _regeneratorRuntime.awrap(simExec('get_app_container', 0, [udid, bundleId], {}, logErrors).stdout.trim()); | ||
@@ -723,2 +734,5 @@ case 2: | ||
// if we don't want to see the errors, just throw and allow the calling | ||
// code do what it wants | ||
// make sure that it gets out of the "Creating" state | ||
@@ -753,2 +767,2 @@ | ||
// otherwise return all the sdk -> device mappings. | ||
//# sourceMappingURL=data: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HAsIGxhdW5jaCwgc3Bhd24sIHNwYXduU3ViUHJvY2Vzcywgb3BlblVybCwgdGVybWluYXRlLCBzaHV0ZG93biwgY3JlYXRlRGV2aWNlLFxuICAgICAgICAgZ2V0QXBwQ29udGFpbmVyLCBkZWxldGVEZXZpY2UsIGVyYXNlRGV2aWNlLCBnZXREZXZpY2VzIH07XG4iXSwic291cmNlUm9vdCI6Ii4uLy4uIn0= |
@@ -9,3 +9,3 @@ import { exec, SubProcess } from 'teen_process'; | ||
async function simCommand (command:string, timeout:number, args:Array = [], env = {}, executingFunction = exec) { | ||
async function simCommand (command:string, timeout:number, args:Array = [], env = {}, executingFunction = exec, logErrors = true) { | ||
// run a particular simctl command | ||
@@ -22,3 +22,7 @@ args = ['simctl', command, ...args]; | ||
} catch (e) { | ||
if (e.stderr) { | ||
if (!logErrors) { | ||
// if we don't want to see the errors, just throw and allow the calling | ||
// code do what it wants | ||
throw e; | ||
} else if (e.stderr) { | ||
log.errorAndThrow(`simctl error running '${command}': ${e.stderr.trim()}`); | ||
@@ -31,6 +35,6 @@ } else { | ||
async function simExec (command:string, timeout:number, args:Array = [], env = {}) { | ||
async function simExec (command:string, timeout:number, args:Array = [], env = {}, logErrors = true) { | ||
return await simCommand(command, timeout, args, env, async (c, a, ob) => { | ||
return await exec(c, a, ob); | ||
}); | ||
}, logErrors); | ||
} | ||
@@ -74,4 +78,4 @@ | ||
async function getAppContainer (udid:string, bundleId:string) { | ||
return await simExec('get_app_container', 0, [udid, bundleId]).stdout.trim(); | ||
async function getAppContainer (udid:string, bundleId:string, logErrors = true) { | ||
return await simExec('get_app_container', 0, [udid, bundleId], {}, logErrors).stdout.trim(); | ||
} | ||
@@ -78,0 +82,0 @@ |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "3.5.0", | ||
"version": "3.5.1", | ||
"author": "https://github.com/appium", | ||
@@ -12,0 +12,0 @@ "license": "Apache-2.0", |
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
71597
1173