appium-xcode
Advanced tools
Comparing version 1.0.2 to 2.0.0
"use strict"; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBO0FBQUEiLCJzb3VyY2VSb290IjoiL1VzZXJzL2pvbmFoc3MvV29ya3NwYWNlL2FwcGl1bS14Y29kZS8iLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUaGlzIGZpbGUgc2hvdWxkIHJlYWQ6XG4vLyBleHBvcnQgKiBmcm9tICdsaWIveGNvZGUuanMnXG5cbi8vIGJ1dCB0aGlzIHN5bnRheCBpcyBicm9rZW4gaW4gdHJhY2V1cjogaHR0cHM6Ly9naXRodWIuY29tL2dvb2dsZS90cmFjZXVyLWNvbXBpbGVyL2lzc3Vlcy8xMDQyXG4iXX0= | ||
//# sourceURL=index.js | ||
// This file should read: | ||
// export * from 'lib/xcode.js' | ||
// but this syntax is broken in traceur: https://github.com/google/traceur-compiler/issues/1042 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbXX0= |
@@ -1,537 +0,396 @@ | ||
"use strict"; | ||
Object.defineProperties(exports, { | ||
getPath: {get: function() { | ||
return getPath; | ||
}}, | ||
getVersion: {get: function() { | ||
return getVersion; | ||
}}, | ||
getAutomationTraceTemplatePath: {get: function() { | ||
return getAutomationTraceTemplatePath; | ||
}}, | ||
getMaxIOSSDK: {get: function() { | ||
return getMaxIOSSDK; | ||
}}, | ||
getAutomationTraceTemplatePathWithoutRetry: {get: function() { | ||
return getAutomationTraceTemplatePathWithoutRetry; | ||
}}, | ||
getMaxIOSSDKWithoutRetry: {get: function() { | ||
return getMaxIOSSDKWithoutRetry; | ||
}}, | ||
clearInternalCache: {get: function() { | ||
return clearInternalCache; | ||
}}, | ||
__esModule: {value: true} | ||
'use strict'; | ||
var _slicedToArray = require('babel-runtime/helpers/sliced-to-array')['default']; | ||
var _core = require('babel-runtime/core-js')['default']; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
_core.Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
var $__npmlog__, | ||
$__appium_45_support__, | ||
$__fs__, | ||
$__denodeify__, | ||
$__path__, | ||
$__asyncbox__, | ||
$__lodash__; | ||
var npmlog = ($__npmlog__ = require("npmlog"), $__npmlog__ && $__npmlog__.__esModule && $__npmlog__ || {default: $__npmlog__}).default; | ||
var support = ($__appium_45_support__ = require("appium-support"), $__appium_45_support__ && $__appium_45_support__.__esModule && $__appium_45_support__ || {default: $__appium_45_support__}).default; | ||
var fs = ($__fs__ = require("fs"), $__fs__ && $__fs__.__esModule && $__fs__ || {default: $__fs__}).default; | ||
var denodeify = ($__denodeify__ = require("denodeify"), $__denodeify__ && $__denodeify__.__esModule && $__denodeify__ || {default: $__denodeify__}).default; | ||
var path = ($__path__ = require("path"), $__path__ && $__path__.__esModule && $__path__ || {default: $__path__}).default; | ||
var retry = ($__asyncbox__ = require("asyncbox"), $__asyncbox__ && $__asyncbox__.__esModule && $__asyncbox__ || {default: $__asyncbox__}).retry; | ||
var _ = ($__lodash__ = require("lodash"), $__lodash__ && $__lodash__.__esModule && $__lodash__ || {default: $__lodash__}).default; | ||
var exec = support.core.exec; | ||
var util = support.util; | ||
var fileExists = support.util.fileExists; | ||
var escapeSpace = support.util.escapeSpace; | ||
var readSymlink = denodeify(fs.readlink); | ||
var _npmlog = require('npmlog'); | ||
var _npmlog2 = _interopRequireWildcard(_npmlog); | ||
var _support = require('appium-support'); | ||
var _support2 = _interopRequireWildcard(_support); | ||
var _fs = require('fs'); | ||
var _fs2 = _interopRequireWildcard(_fs); | ||
var _denodeify = require('denodeify'); | ||
var _denodeify2 = _interopRequireWildcard(_denodeify); | ||
var _path = require('path'); | ||
var _path2 = _interopRequireWildcard(_path); | ||
var _retry = require('asyncbox'); | ||
var _import = require('lodash'); | ||
var _import2 = _interopRequireWildcard(_import); | ||
var exec = _support2['default'].core.exec; | ||
var util = _support2['default'].util; | ||
var fileExists = _support2['default'].util.fileExists; | ||
var escapeSpace = _support2['default'].util.escapeSpace; | ||
var readSymlink = _denodeify2['default'](_fs2['default'].readlink); | ||
var env = process.env; | ||
var XCODE_SELECT_TIMEOUT = 3000; | ||
var XCODE_SUBDIR = "/Contents/Developer"; | ||
var XCODE_SUBDIR = '/Contents/Developer'; | ||
var DEFAULT_NUMBER_OF_RETRIES = 3; | ||
var log = process.env.GLOBAL_NPMLOG ? global.log : npmlog; | ||
var log = process.env.GLOBAL_NPMLOG ? global.log : _npmlog2['default']; | ||
function hasExpectedSubDir(path) { | ||
return path.substring(path.length - XCODE_SUBDIR.length) === XCODE_SUBDIR; | ||
} | ||
function getPathFromSymlink(failMessage) { | ||
var symlinkPath, | ||
legacySymlinkPath, | ||
customPath, | ||
mesg, | ||
msg, | ||
$__8, | ||
$__9, | ||
$__10, | ||
$__11, | ||
$__12, | ||
$__13; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
log.warn(("Finding XcodePath by symlink because " + failMessage)); | ||
symlinkPath = "/var/db/xcode_select_link"; | ||
legacySymlinkPath = "/usr/share/xcode-select/xcode_dir_path"; | ||
$ctx.state = 34; | ||
var symlinkPath, legacySymlinkPath, customPath, mesg, msg; | ||
return _regeneratorRuntime.async(function getPathFromSymlink$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
// Node's invocation of xcode-select sometimes flakes and returns an empty string. | ||
// Not clear why. As a workaround, Appium can reliably deduce the version in use by checking | ||
// the locations xcode-select uses to store the selected version's path. This should be 100% | ||
// reliable so long as the link locations remain the same. However, since we're relying on | ||
// hardcoded paths, this approach will break the next time Apple changes the symlink location. | ||
log.warn('Finding XcodePath by symlink because ' + failMessage); | ||
symlinkPath = '/var/db/xcode_select_link'; | ||
legacySymlinkPath = '/usr/share/xcode-select/xcode_dir_path'; | ||
if (!util.hasContent(env.DEVELOPER_DIR)) { | ||
context$1$0.next = 14; | ||
break; | ||
case 34: | ||
$ctx.state = (util.hasContent(env.DEVELOPER_DIR)) ? 12 : 8; | ||
} | ||
customPath = hasExpectedSubDir(env.DEVELOPER_DIR) ? env.DEVELOPER_DIR : env.DEVELOPER_DIR + XCODE_SUBDIR; | ||
context$1$0.next = 7; | ||
return fileExists(customPath); | ||
case 7: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 11; | ||
break; | ||
case 12: | ||
customPath = hasExpectedSubDir(env.DEVELOPER_DIR) ? env.DEVELOPER_DIR : env.DEVELOPER_DIR + XCODE_SUBDIR; | ||
$ctx.state = 13; | ||
} | ||
return context$1$0.abrupt('return', customPath); | ||
case 11: | ||
mesg = 'Could not find path to Xcode, environment variable ' + ('DEVELOPER_DIR set to: ' + env.DEVELOPER_DIR + ' ') + 'but no Xcode found'; | ||
log.warn(mesg); | ||
throw new Error(mesg); | ||
case 14: | ||
context$1$0.next = 16; | ||
return fileExists(symlinkPath); | ||
case 16: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 18; | ||
break; | ||
case 13: | ||
$__8 = fileExists(customPath); | ||
$ctx.state = 5; | ||
} | ||
return context$1$0.abrupt('return', readSymlink(symlinkPath)); | ||
case 18: | ||
context$1$0.next = 20; | ||
return fileExists(legacySymlinkPath); | ||
case 20: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 22; | ||
break; | ||
case 5: | ||
Promise.resolve($__8).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
$__9 = $ctx.value; | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
$ctx.state = ($__9) ? 6 : 9; | ||
break; | ||
case 6: | ||
$ctx.returnValue = customPath; | ||
$ctx.state = 7; | ||
break; | ||
case 7: | ||
$ctx.state = -2; | ||
break; | ||
case 9: | ||
mesg = "Could not find path to Xcode, environment variable " + ("DEVELOPER_DIR set to: " + env.DEVELOPER_DIR + " ") + "but no Xcode found"; | ||
log.warn(mesg); | ||
throw new Error(mesg); | ||
$ctx.state = 8; | ||
break; | ||
case 8: | ||
$__10 = fileExists(symlinkPath); | ||
$ctx.state = 19; | ||
break; | ||
case 19: | ||
Promise.resolve($__10).then($ctx.createCallback(17), $ctx.errback); | ||
return; | ||
case 17: | ||
$__11 = $ctx.value; | ||
$ctx.state = 16; | ||
break; | ||
case 16: | ||
$ctx.state = ($__11) ? 20 : 22; | ||
break; | ||
case 20: | ||
$ctx.returnValue = readSymlink(symlinkPath); | ||
$ctx.state = 21; | ||
break; | ||
case 21: | ||
$ctx.state = -2; | ||
break; | ||
case 22: | ||
$__12 = fileExists(legacySymlinkPath); | ||
$ctx.state = 28; | ||
break; | ||
case 28: | ||
Promise.resolve($__12).then($ctx.createCallback(26), $ctx.errback); | ||
return; | ||
case 26: | ||
$__13 = $ctx.value; | ||
$ctx.state = 25; | ||
break; | ||
case 25: | ||
$ctx.state = ($__13) ? 29 : 31; | ||
break; | ||
case 29: | ||
$ctx.returnValue = readSymlink(legacySymlinkPath); | ||
$ctx.state = 30; | ||
break; | ||
case 30: | ||
$ctx.state = -2; | ||
break; | ||
case 31: | ||
msg = ("Could not find path to Xcode by symlinks located in " + symlinkPath + ", or " + legacySymlinkPath); | ||
log.warn(msg); | ||
throw new Error(msg); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
} | ||
return context$1$0.abrupt('return', readSymlink(legacySymlinkPath)); | ||
case 22: | ||
msg = 'Could not find path to Xcode by symlinks located in ' + symlinkPath + ', or ' + legacySymlinkPath; | ||
log.warn(msg); | ||
throw new Error(msg); | ||
case 25: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
function getPathFromXcodeSelect() { | ||
var stdout, | ||
xcodeFolderPath, | ||
msg, | ||
$__14, | ||
$__15, | ||
$__16, | ||
$__17, | ||
$__18; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
$__14 = exec('xcode-select --print-path', { | ||
maxBuffer: 524288, | ||
timeout: XCODE_SELECT_TIMEOUT | ||
}); | ||
$ctx.state = 5; | ||
var _ref, _ref2, stdout, xcodeFolderPath, msg; | ||
return _regeneratorRuntime.async(function getPathFromXcodeSelect$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return exec('xcode-select --print-path', { maxBuffer: 524288, timeout: XCODE_SELECT_TIMEOUT }); | ||
case 2: | ||
_ref = context$1$0.sent; | ||
_ref2 = _slicedToArray(_ref, 1); | ||
stdout = _ref2[0]; | ||
xcodeFolderPath = stdout.replace(new RegExp('/$'), '').trim(); | ||
if (util.hasContent(xcodeFolderPath)) { | ||
context$1$0.next = 8; | ||
break; | ||
case 5: | ||
Promise.resolve($__14).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
$__15 = $ctx.value; | ||
$ctx.state = 2; | ||
} | ||
throw new Error('xcode-select returned an empty string'); | ||
case 8: | ||
context$1$0.next = 10; | ||
return fileExists(xcodeFolderPath); | ||
case 10: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 14; | ||
break; | ||
case 2: | ||
$__16 = $__15[0]; | ||
stdout = $__16; | ||
$ctx.state = 7; | ||
break; | ||
case 7: | ||
xcodeFolderPath = stdout.replace(new RegExp("/$"), "").trim(); | ||
if (!util.hasContent(xcodeFolderPath)) { | ||
throw new Error("xcode-select returned an empty string"); | ||
} | ||
$ctx.state = 20; | ||
break; | ||
case 20: | ||
$__17 = fileExists(xcodeFolderPath); | ||
$ctx.state = 12; | ||
break; | ||
case 12: | ||
Promise.resolve($__17).then($ctx.createCallback(10), $ctx.errback); | ||
return; | ||
case 10: | ||
$__18 = $ctx.value; | ||
$ctx.state = 9; | ||
break; | ||
case 9: | ||
$ctx.state = ($__18) ? 13 : 16; | ||
break; | ||
case 13: | ||
$ctx.returnValue = xcodeFolderPath; | ||
$ctx.state = 14; | ||
break; | ||
case 14: | ||
$ctx.state = -2; | ||
break; | ||
case 16: | ||
msg = ("xcode-select could not find xcode. Path: " + xcodeFolderPath + " does not exist."); | ||
log.error(msg); | ||
throw new Error(msg); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
} | ||
return context$1$0.abrupt('return', xcodeFolderPath); | ||
case 14: | ||
msg = 'xcode-select could not find xcode. Path: ' + xcodeFolderPath + ' does not exist.'; | ||
log.error(msg); | ||
throw new Error(msg); | ||
case 17: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
var getPath = _.memoize(function() { | ||
return getPathFromXcodeSelect().catch(getPathFromSymlink); | ||
var getPath = _import2['default'].memoize(function () { | ||
// first we try using xcode-select to find the path | ||
// then we try using the symlinks that Apple has by default | ||
return getPathFromXcodeSelect()['catch'](getPathFromSymlink); | ||
}); | ||
function getVersionWithoutRetry() { | ||
var xcodePath, | ||
plistPath, | ||
cmd, | ||
stdout, | ||
versionPattern, | ||
match, | ||
$__19, | ||
$__20, | ||
$__21, | ||
$__22, | ||
$__23; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(getPath()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
xcodePath = $ctx.value; | ||
$ctx.state = 2; | ||
var xcodePath, plistPath, cmd, _ref3, _ref32, stdout, versionPattern, match; | ||
return _regeneratorRuntime.async(function getVersionWithoutRetry$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return getPath(); | ||
case 2: | ||
xcodePath = context$1$0.sent; | ||
plistPath = xcodePath.replace(XCODE_SUBDIR, '/Contents/Info.plist'); | ||
context$1$0.next = 6; | ||
return fileExists(plistPath); | ||
case 6: | ||
if (context$1$0.sent) { | ||
context$1$0.next = 8; | ||
break; | ||
case 2: | ||
plistPath = xcodePath.replace(XCODE_SUBDIR, "/Contents/Info.plist"); | ||
$ctx.state = 23; | ||
} | ||
throw new Error('Could not get Xcode version. ' + plistPath + ' does not exist on disk.'); | ||
case 8: | ||
cmd = '/usr/libexec/PlistBuddy -c \'Print CFBundleShortVersionString\' ' + escapeSpace(plistPath); | ||
context$1$0.next = 11; | ||
return exec(cmd, { maxBuffer: 524288, timeout: XCODE_SELECT_TIMEOUT }); | ||
case 11: | ||
_ref3 = context$1$0.sent; | ||
_ref32 = _slicedToArray(_ref3, 1); | ||
stdout = _ref32[0]; | ||
versionPattern = /\d\.\d\.*\d*/; | ||
match = stdout.match(versionPattern); | ||
if (!(match === null || !util.hasContent(match[0]))) { | ||
context$1$0.next = 18; | ||
break; | ||
case 23: | ||
$__19 = fileExists(plistPath); | ||
$ctx.state = 8; | ||
break; | ||
case 8: | ||
Promise.resolve($__19).then($ctx.createCallback(6), $ctx.errback); | ||
return; | ||
case 6: | ||
$__20 = $ctx.value; | ||
$ctx.state = 5; | ||
break; | ||
case 5: | ||
$ctx.state = (!$__20) ? 9 : 10; | ||
break; | ||
case 9: | ||
throw new Error(("Could not get Xcode version. " + plistPath + " does not exist on disk.")); | ||
$ctx.state = 10; | ||
break; | ||
case 10: | ||
cmd = ("/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' " + escapeSpace(plistPath)); | ||
$ctx.state = 25; | ||
break; | ||
case 25: | ||
$__21 = exec(cmd, { | ||
maxBuffer: 524288, | ||
timeout: XCODE_SELECT_TIMEOUT | ||
}); | ||
$ctx.state = 16; | ||
break; | ||
case 16: | ||
Promise.resolve($__21).then($ctx.createCallback(14), $ctx.errback); | ||
return; | ||
case 14: | ||
$__22 = $ctx.value; | ||
$ctx.state = 13; | ||
break; | ||
case 13: | ||
$__23 = $__22[0]; | ||
stdout = $__23; | ||
$ctx.state = 18; | ||
break; | ||
case 18: | ||
versionPattern = /\d\.\d\.*\d*/; | ||
match = stdout.match(versionPattern); | ||
if (match === null || !util.hasContent(match[0])) { | ||
throw new Error(("Could not parse Xcode version. xcodebuild output was: " + stdout)); | ||
} | ||
$ctx.state = 27; | ||
break; | ||
case 27: | ||
$ctx.returnValue = match[0]; | ||
$ctx.state = 20; | ||
break; | ||
case 20: | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
} | ||
throw new Error('Could not parse Xcode version. xcodebuild output was: ' + stdout); | ||
case 18: | ||
return context$1$0.abrupt('return', match[0]); | ||
case 19: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
var getVersion = _.memoize(function() { | ||
var retries; | ||
var $arguments = arguments; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
retries = $arguments[0] !== (void 0) ? $arguments[0] : DEFAULT_NUMBER_OF_RETRIES; | ||
$ctx.state = 5; | ||
break; | ||
case 5: | ||
$ctx.returnValue = retry(retries, getVersionWithoutRetry); | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
var getVersion = _import2['default'].memoize(function () { | ||
var retries = arguments[0] === undefined ? DEFAULT_NUMBER_OF_RETRIES : arguments[0]; | ||
return _retry.retry(retries, getVersionWithoutRetry); | ||
}); | ||
function getAutomationTraceTemplatePathWithoutRetry() { | ||
var xcodePath, | ||
extensions, | ||
pathPrefix, | ||
pathSuffix, | ||
automationTraceTemplatePaths, | ||
msg, | ||
$__24, | ||
$__25, | ||
$__26, | ||
$__27, | ||
$__28, | ||
$__29; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(getPath()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
xcodePath = $ctx.value; | ||
$ctx.state = 2; | ||
var xcodePath, extensions, pathPrefix, pathSuffix, automationTraceTemplatePaths, msg; | ||
return _regeneratorRuntime.async(function getAutomationTraceTemplatePathWithoutRetry$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return getPath(); | ||
case 2: | ||
xcodePath = context$1$0.sent; | ||
extensions = ['xrplugin', 'bundle']; | ||
pathPrefix = _path2['default'].resolve(xcodePath, '../Applications/Instruments.app/Contents/PlugIns'); | ||
pathSuffix = 'Contents/Resources/Automation.tracetemplate'; | ||
automationTraceTemplatePaths = [_path2['default'].resolve(pathPrefix, 'AutomationInstrument.' + extensions[0], pathSuffix), _path2['default'].resolve(pathPrefix, 'AutomationInstrument.' + extensions[1], pathSuffix)]; | ||
context$1$0.next = 9; | ||
return fileExists(automationTraceTemplatePaths[0]); | ||
case 9: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 11; | ||
break; | ||
case 2: | ||
extensions = ['xrplugin', 'bundle']; | ||
pathPrefix = path.resolve(xcodePath, "../Applications/Instruments.app/Contents/PlugIns"); | ||
pathSuffix = "Contents/Resources/Automation.tracetemplate"; | ||
automationTraceTemplatePaths = [path.resolve(pathPrefix, "AutomationInstrument." + extensions[0], pathSuffix), path.resolve(pathPrefix, "AutomationInstrument." + extensions[1], pathSuffix)]; | ||
$ctx.state = 23; | ||
} | ||
return context$1$0.abrupt('return', automationTraceTemplatePaths[0]); | ||
case 11: | ||
context$1$0.next = 13; | ||
return fileExists(automationTraceTemplatePaths[1]); | ||
case 13: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 15; | ||
break; | ||
case 23: | ||
$__24 = automationTraceTemplatePaths[0]; | ||
$__25 = fileExists($__24); | ||
$ctx.state = 8; | ||
break; | ||
case 8: | ||
Promise.resolve($__25).then($ctx.createCallback(6), $ctx.errback); | ||
return; | ||
case 6: | ||
$__26 = $ctx.value; | ||
$ctx.state = 5; | ||
break; | ||
case 5: | ||
$ctx.state = ($__26) ? 9 : 11; | ||
break; | ||
case 9: | ||
$ctx.returnValue = automationTraceTemplatePaths[0]; | ||
$ctx.state = 10; | ||
break; | ||
case 10: | ||
$ctx.state = -2; | ||
break; | ||
case 11: | ||
$__27 = automationTraceTemplatePaths[1]; | ||
$__28 = fileExists($__27); | ||
$ctx.state = 17; | ||
break; | ||
case 17: | ||
Promise.resolve($__28).then($ctx.createCallback(15), $ctx.errback); | ||
return; | ||
case 15: | ||
$__29 = $ctx.value; | ||
$ctx.state = 14; | ||
break; | ||
case 14: | ||
$ctx.state = ($__29) ? 18 : 20; | ||
break; | ||
case 18: | ||
$ctx.returnValue = automationTraceTemplatePaths[1]; | ||
$ctx.state = 19; | ||
break; | ||
case 19: | ||
$ctx.state = -2; | ||
break; | ||
case 20: | ||
msg = "Could not find Automation.tracetemplate in any of the following" + ("locations " + automationTraceTemplatePaths.toString()); | ||
log.error(msg); | ||
throw new Error(msg); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
} | ||
return context$1$0.abrupt('return', automationTraceTemplatePaths[1]); | ||
case 15: | ||
msg = 'Could not find Automation.tracetemplate in any of the following' + ('locations ' + automationTraceTemplatePaths.toString()); | ||
log.error(msg); | ||
throw new Error(msg); | ||
case 18: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
var getAutomationTraceTemplatePath = _.memoize(function() { | ||
var retries; | ||
var $arguments = arguments; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
retries = $arguments[0] !== (void 0) ? $arguments[0] : DEFAULT_NUMBER_OF_RETRIES; | ||
$ctx.state = 5; | ||
break; | ||
case 5: | ||
$ctx.returnValue = retry(retries, getAutomationTraceTemplatePathWithoutRetry); | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
var getAutomationTraceTemplatePath = _import2['default'].memoize(function () { | ||
var retries = arguments[0] === undefined ? DEFAULT_NUMBER_OF_RETRIES : arguments[0]; | ||
return _retry.retry(retries, getAutomationTraceTemplatePathWithoutRetry); | ||
}); | ||
// TODO remove this function. should really just be using 'getVersion()' everywhere. | ||
// This was added for tech-debt backwards compatibility | ||
function getMaxIOSSDKWithoutRetry() { | ||
var version, | ||
cmd, | ||
stdout, | ||
sdkVersion, | ||
match, | ||
$__30, | ||
$__31, | ||
$__32; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(getVersion()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
version = $ctx.value; | ||
$ctx.state = 2; | ||
var version, cmd, _ref4, _ref42, stdout, sdkVersion, match; | ||
return _regeneratorRuntime.async(function getMaxIOSSDKWithoutRetry$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return getVersion(); | ||
case 2: | ||
version = context$1$0.sent; | ||
if (!(version === '4')) { | ||
context$1$0.next = 5; | ||
break; | ||
case 2: | ||
$ctx.state = (version === '4') ? 4 : 6; | ||
} | ||
return context$1$0.abrupt('return', '6.1'); | ||
case 5: | ||
cmd = 'xcrun --sdk iphonesimulator --show-sdk-version'; | ||
context$1$0.next = 8; | ||
return exec(cmd, { maxBuffer: 524288, timeout: XCODE_SELECT_TIMEOUT }); | ||
case 8: | ||
_ref4 = context$1$0.sent; | ||
_ref42 = _slicedToArray(_ref4, 1); | ||
stdout = _ref42[0]; | ||
sdkVersion = stdout.trim(); | ||
match = /\d.\d/.exec(stdout); | ||
if (match) { | ||
context$1$0.next = 15; | ||
break; | ||
case 4: | ||
$ctx.returnValue = '6.1'; | ||
$ctx.state = 5; | ||
break; | ||
case 5: | ||
$ctx.state = -2; | ||
break; | ||
case 6: | ||
cmd = "xcrun --sdk iphonesimulator --show-sdk-version"; | ||
$ctx.state = 19; | ||
break; | ||
case 19: | ||
$__30 = exec(cmd, { | ||
maxBuffer: 524288, | ||
timeout: XCODE_SELECT_TIMEOUT | ||
}); | ||
$ctx.state = 12; | ||
break; | ||
case 12: | ||
Promise.resolve($__30).then($ctx.createCallback(10), $ctx.errback); | ||
return; | ||
case 10: | ||
$__31 = $ctx.value; | ||
$ctx.state = 9; | ||
break; | ||
case 9: | ||
$__32 = $__31[0]; | ||
stdout = $__32; | ||
$ctx.state = 14; | ||
break; | ||
case 14: | ||
sdkVersion = stdout.trim(); | ||
match = /\d.\d/.exec(stdout); | ||
if (!match) { | ||
throw new Error(("xcrun returned a non-numeric iOS SDK version: " + sdkVersion)); | ||
} | ||
$ctx.state = 21; | ||
break; | ||
case 21: | ||
$ctx.returnValue = sdkVersion; | ||
$ctx.state = 16; | ||
break; | ||
case 16: | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
} | ||
throw new Error('xcrun returned a non-numeric iOS SDK version: ' + sdkVersion); | ||
case 15: | ||
return context$1$0.abrupt('return', sdkVersion); | ||
case 16: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
var getMaxIOSSDK = _.memoize(function() { | ||
var retries = arguments[0] !== (void 0) ? arguments[0] : DEFAULT_NUMBER_OF_RETRIES; | ||
return retry(retries, getMaxIOSSDKWithoutRetry); | ||
var getMaxIOSSDK = _import2['default'].memoize(function () { | ||
var retries = arguments[0] === undefined ? DEFAULT_NUMBER_OF_RETRIES : arguments[0]; | ||
return _retry.retry(retries, getMaxIOSSDKWithoutRetry); | ||
}); | ||
function clearInternalCache() { | ||
// memoized functions | ||
var memoized = [getPath, getVersion, getAutomationTraceTemplatePath, getMaxIOSSDK]; | ||
memoized.forEach((function(f) { | ||
memoized.forEach(function (f) { | ||
if (f.cache) { | ||
f.cache = new _.memoize.Cache(); | ||
f.cache = new _import2['default'].memoize.Cache(); | ||
} | ||
})); | ||
}); | ||
} | ||
; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieGNvZGUuanMiLCJzb3VyY2VzIjpbInhjb2RlLmpzIiwiQHRyYWNldXIvZ2VuZXJhdGVkL1RlbXBsYXRlUGFyc2VyLzciLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvNSIsIkB0cmFjZXVyL2dlbmVyYXRlZC9UZW1wbGF0ZVBhcnNlci8zIiwiQHRyYWNldXIvZ2VuZXJhdGVkL1RlbXBsYXRlUGFyc2VyLzQiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvNiIsIkB0cmFjZXVyL2dlbmVyYXRlZC9UZW1wbGF0ZVBhcnNlci8yIiwiQHRyYWNldXIvZ2VuZXJhdGVkL1RlbXBsYXRlUGFyc2VyLzE1IiwiQHRyYWNldXIvZ2VuZXJhdGVkL1RlbXBsYXRlUGFyc2VyLzgiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvMTQiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvMTEiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvMTIiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvOSIsIkB0cmFjZXVyL2dlbmVyYXRlZC9UZW1wbGF0ZVBhcnNlci8xMCIsIkB0cmFjZXVyL2dlbmVyYXRlZC9UZW1wbGF0ZVBhcnNlci8xMyIsIkB0cmFjZXVyL2dlbmVyYXRlZC9UZW1wbGF0ZVBhcnNlci8xNiJdLCJu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bGFjZWhvbGRlcl9fMCA9IHJlcXVpcmUoJF9fcGxhY2Vob2xkZXJfXzEpLFxuICAgICAgICAkX19wbGFjZWhvbGRlcl9fMiAmJiAkX19wbGFjZWhvbGRlcl9fMy5fX2VzTW9kdWxlICYmICRfX3BsYWNlaG9sZGVyX180IHx8IHtkZWZhdWx0OiAkX19wbGFjZWhvbGRlcl9fNX0pIiwicmV0dXJuICRfX3BsYWNlaG9sZGVyX18wKFxuICAgICAgICAgICAgICAkX19wbGFjZWhvbGRlcl9fMSwgdGhpcyk7IiwiJHRyYWNldXJSdW50aW1lLmFzeW5jV3JhcCIsImZ1bmN0aW9uKCRjdHgpIHtcbiAgICAgIHdoaWxlICh0cnVlKSAkX19wbGFjZWhvbGRlcl9fMFxuICAgIH0iLCIkY3R4LnN0YXRlID0gKCRfX3BsYWNlaG9sZGVyX18wKSA/ICRfX3BsYWNlaG9sZGVyX18xIDogJF9fcGxhY2Vob2xkZXJfXzI7XG4gICAgICAgIGJyZWFrIiwiUHJvbWlzZS5yZXNvbHZlKCRfX3BsYWNlaG9sZGVyX18wKS50aGVuKFxuICAgICAgICAgICRjdHguY3JlYXRlQ2FsbGJhY2soJF9fcGxhY2Vob2xkZXJfXzEpLCAkY3R4LmVycmJhY2spO1xuICAgICAgICAgIHJldHVybjsiLCIkY3R4LnZhbHVlIiwiJGN0eC5yZXR1cm5WYWx1ZSA9ICRfX3BsYWNlaG9sZGVyX18wIiwicmV0dXJuICRjdHguZW5kKCkiLCJ2YXIgJGFyZ3VtZW50cyA9IGFyZ3VtZW50czsiXX0= | ||
//# sourceURL=xcode.js | ||
exports.getPath = getPath; | ||
exports.getVersion = getVersion; | ||
exports.getAutomationTraceTemplatePath = getAutomationTraceTemplatePath; | ||
exports.getMaxIOSSDK = getMaxIOSSDK; | ||
exports.getAutomationTraceTemplatePathWithoutRetry = getAutomationTraceTemplatePathWithoutRetry; | ||
exports.getMaxIOSSDKWithoutRetry = getMaxIOSSDKWithoutRetry; | ||
exports.clearInternalCache = clearInternalCache; | ||
// Xcode < 5.x (?) | ||
// xcode-select allows users to override its settings with the DEVELOPER_DIR env var, | ||
// so check that first | ||
// We should only get here is we failed to capture xcode-select's stdout and our | ||
// other checks failed. Either Apple has moved the symlink to a new location or the user | ||
// is not using the default install. 99.999% chance it's the latter, so issue a warning | ||
// should we ever hit the edge case. | ||
// trim and remove trailing slash | ||
// we want to read the CFBundleShortVersionString from Xcode's plist. | ||
// It should be in /[root]/XCode.app/Contents/ | ||
// need to use string#match here; previous code used regexp#exec, which does not return null | ||
// for ios 8 and up, the file extension for AutiomationInstrument changed. | ||
// rather than waste time getting the iOSSDKVersion, just get both paths and see which one exists | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi94Y29kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztzQkFBbUIsUUFBUTs7Ozt1QkFDUCxnQkFBZ0I7Ozs7a0JBQ3JCLElBQUk7Ozs7eUJBQ0csV0FBVzs7OztvQkFDaEIsTUFBTTs7OztxQkFDRCxVQUFVOztzQkFDbEIsUUFBUTs7OztBQUV0QixJQUFNLElBQUksR0FBRyxxQkFBUSxJQUFJLENBQUMsSUFBSSxDQUFDO0FBQy9CLElBQU0sSUFBSSxHQUFHLHFCQUFRLElBQUksQ0FBQztBQUMxQixJQUFNLFVBQVUsR0FBRyxxQkFBUSxJQUFJLENBQUMsVUFBVSxDQUFDO0FBQzNDLElBQU0sV0FBVyxHQUFHLHFCQUFRLElBQUksQ0FBQyxXQUFXLENBQUM7QUFDN0MsSUFBTSxXQUFXLEdBQUcsdUJBQVUsZ0JBQUcsUUFBUSxDQUFDLENBQUM7QUFDM0MsSUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQzs7QUFFeEIsSUFBTSxvQkFBb0IsR0FBRyxJQUFJLENBQUM7QUFDbEMsSUFBTSxZQUFZLEdBQU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nVuY3Rpb24gY2xlYXJJbnRlcm5hbENhY2hlICgpIHtcblxuICAvLyBtZW1vaXplZCBmdW5jdGlvbnNcbiAgY29uc3QgbWVtb2l6ZWQgPSBbZ2V0UGF0aCwgZ2V0VmVyc2lvbiwgZ2V0QXV0b21hdGlvblRyYWNlVGVtcGxhdGVQYXRoLFxuICAgICAgICAgICAgICAgICAgICBnZXRNYXhJT1NTREtdO1xuXG4gIG1lbW9pemVkLmZvckVhY2goKGYpID0+IHtcbiAgICBpZiAoZi5jYWNoZSkge1xuICAgICAgZi5jYWNoZSA9IG5ldyBfLm1lbW9pemUuQ2FjaGUoKTtcbiAgICB9XG4gIH0pO1xuXG5cbn1cblxuZXhwb3J0IHsgZ2V0UGF0aCwgZ2V0VmVyc2lvbiwgZ2V0QXV0b21hdGlvblRyYWNlVGVtcGxhdGVQYXRoLCBnZXRNYXhJT1NTREssXG4gICAgICAgICBnZXRBdXRvbWF0aW9uVHJhY2VUZW1wbGF0ZVBhdGhXaXRob3V0UmV0cnksIGdldE1heElPU1NES1dpdGhvdXRSZXRyeSxcbiAgICAgICAgIGNsZWFySW50ZXJuYWxDYWNoZSB9O1xuIl19 |
@@ -1,201 +0,207 @@ | ||
"use strict"; | ||
var $___46__46__47_lib_47_xcode__, | ||
$__chai__, | ||
$__chai_45_as_45_promised__, | ||
$__mochawait__, | ||
$__fs__, | ||
$__denodeify__, | ||
$__lodash__; | ||
require('appium-transpile-runtime'); | ||
var xcode = ($___46__46__47_lib_47_xcode__ = require("../lib/xcode"), $___46__46__47_lib_47_xcode__ && $___46__46__47_lib_47_xcode__.__esModule && $___46__46__47_lib_47_xcode__ || {default: $___46__46__47_lib_47_xcode__}); | ||
var chai = ($__chai__ = require("chai"), $__chai__ && $__chai__.__esModule && $__chai__ || {default: $__chai__}).default; | ||
var chaiAsPromised = ($__chai_45_as_45_promised__ = require("chai-as-promised"), $__chai_45_as_45_promised__ && $__chai_45_as_45_promised__.__esModule && $__chai_45_as_45_promised__ || {default: $__chai_45_as_45_promised__}).default; | ||
($__mochawait__ = require("mochawait"), $__mochawait__ && $__mochawait__.__esModule && $__mochawait__ || {default: $__mochawait__}); | ||
var fs = ($__fs__ = require("fs"), $__fs__ && $__fs__.__esModule && $__fs__ || {default: $__fs__}).default; | ||
var denodeify = ($__denodeify__ = require("denodeify"), $__denodeify__ && $__denodeify__.__esModule && $__denodeify__ || {default: $__denodeify__}).default; | ||
var _ = ($__lodash__ = require("lodash"), $__lodash__ && $__lodash__.__esModule && $__lodash__ || {default: $__lodash__}).default; | ||
var should = chai.should(); | ||
chai.use(chaiAsPromised); | ||
var fileExists = denodeify(fs.stat); | ||
describe('xcode @skip-linux', (function() { | ||
it('should get the path to xcode executable', function() { | ||
'use strict'; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
var _this = this; | ||
var _import = require('../lib/xcode'); | ||
var xcode = _interopRequireWildcard(_import); | ||
var _chai = require('chai'); | ||
var _chai2 = _interopRequireWildcard(_chai); | ||
var _chaiAsPromised = require('chai-as-promised'); | ||
var _chaiAsPromised2 = _interopRequireWildcard(_chaiAsPromised); | ||
require('mochawait'); | ||
var _fs = require('fs'); | ||
var _fs2 = _interopRequireWildcard(_fs); | ||
var _denodeify = require('denodeify'); | ||
var _denodeify2 = _interopRequireWildcard(_denodeify); | ||
var _import2 = require('lodash'); | ||
var _import3 = _interopRequireWildcard(_import2); | ||
require('source-map-support').install(); | ||
var should = _chai2['default'].should(); | ||
_chai2['default'].use(_chaiAsPromised2['default']); | ||
var fileExists = _denodeify2['default'](_fs2['default'].stat); | ||
describe('xcode @skip-linux', function () { | ||
it('should get the path to xcode executable', function callee$1$0() { | ||
var path; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(xcode.getPath()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
path = $ctx.value; | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
should.exist(path); | ||
$ctx.state = 7; | ||
break; | ||
case 7: | ||
Promise.resolve(fileExists(path)).then($ctx.createCallback(-2), $ctx.errback); | ||
return; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return xcode.getPath(); | ||
case 2: | ||
path = context$2$0.sent; | ||
should.exist(path); | ||
context$2$0.next = 6; | ||
return fileExists(path); | ||
case 6: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it('should get the version of xcode', function() { | ||
it('should get the version of xcode', function callee$1$1() { | ||
var version; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(xcode.getVersion()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
version = $ctx.value; | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
should.exist(version); | ||
_.isString(version).should.be.true; | ||
/\d\.\d\.*\d*/.test(version).should.be.true; | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
return _regeneratorRuntime.async(function callee$1$1$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return xcode.getVersion(); | ||
case 2: | ||
version = context$2$0.sent; | ||
should.exist(version); | ||
_import3['default'].isString(version).should.be['true']; | ||
/\d\.\d\.*\d*/.test(version).should.be['true']; | ||
case 6: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it('should get the path and version again, these values are cached', function() { | ||
var before, | ||
path, | ||
after, | ||
version; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(xcode.getPath()).then($ctx.createCallback(2), $ctx.errback); | ||
return; | ||
case 2: | ||
Promise.resolve(xcode.getVersion()).then($ctx.createCallback(4), $ctx.errback); | ||
return; | ||
case 4: | ||
before = new Date(); | ||
$ctx.state = 14; | ||
break; | ||
case 14: | ||
Promise.resolve(xcode.getPath()).then($ctx.createCallback(7), $ctx.errback); | ||
return; | ||
case 7: | ||
path = $ctx.value; | ||
$ctx.state = 6; | ||
break; | ||
case 6: | ||
after = new Date(); | ||
should.exist(path); | ||
$ctx.state = 16; | ||
break; | ||
case 16: | ||
Promise.resolve(fileExists(path)).then($ctx.createCallback(9), $ctx.errback); | ||
return; | ||
case 9: | ||
(after - before).should.be.at.most(2); | ||
before = new Date(); | ||
$ctx.state = 18; | ||
break; | ||
case 18: | ||
Promise.resolve(xcode.getVersion()).then($ctx.createCallback(12), $ctx.errback); | ||
return; | ||
case 12: | ||
version = $ctx.value; | ||
$ctx.state = 11; | ||
break; | ||
case 11: | ||
after = new Date(); | ||
should.exist(version); | ||
_.isString(version).should.be.true; | ||
/\d\.\d\.*\d*/.test(version).should.be.true; | ||
(after - before).should.be.at.most(2); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
it('should get the path and version again, these values are cached', function callee$1$2() { | ||
var before, path, after, version; | ||
return _regeneratorRuntime.async(function callee$1$2$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return xcode.getPath(); | ||
case 2: | ||
context$2$0.next = 4; | ||
return xcode.getVersion(); | ||
case 4: | ||
before = new Date(); | ||
context$2$0.next = 7; | ||
return xcode.getPath(); | ||
case 7: | ||
path = context$2$0.sent; | ||
after = new Date(); | ||
should.exist(path); | ||
context$2$0.next = 12; | ||
return fileExists(path); | ||
case 12: | ||
(after - before).should.be.at.most(2); | ||
before = new Date(); | ||
context$2$0.next = 16; | ||
return xcode.getVersion(); | ||
case 16: | ||
version = context$2$0.sent; | ||
after = new Date(); | ||
should.exist(version); | ||
_import3['default'].isString(version).should.be['true']; | ||
/\d\.\d\.*\d*/.test(version).should.be['true']; | ||
(after - before).should.be.at.most(2); | ||
case 22: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it('should clear the cache if asked to', function() { | ||
var before, | ||
after; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
xcode.clearInternalCache(); | ||
before = new Date(); | ||
$ctx.state = 4; | ||
break; | ||
case 4: | ||
Promise.resolve(xcode.getPath()).then($ctx.createCallback(2), $ctx.errback); | ||
return; | ||
case 2: | ||
after = new Date(); | ||
(after - before).should.be.at.least(7); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
it('should clear the cache if asked to', function callee$1$3() { | ||
var before, after; | ||
return _regeneratorRuntime.async(function callee$1$3$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
xcode.clearInternalCache(); | ||
before = new Date(); | ||
context$2$0.next = 4; | ||
return xcode.getPath(); | ||
case 4: | ||
after = new Date(); | ||
(after - before).should.be.at.least(7); | ||
case 6: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it('should find the automation trace template', (function() { | ||
var path, | ||
suffix; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(xcode.getAutomationTraceTemplatePath()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
path = $ctx.value; | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
should.exist(path); | ||
fileExists(path).should.eventually.be.true; | ||
suffix = ".tracetemplate"; | ||
path.slice(-suffix.length).should.equal(suffix); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
})); | ||
it('should get max iOS SDK version', (function() { | ||
it('should find the automation trace template', function callee$1$4() { | ||
var path, suffix; | ||
return _regeneratorRuntime.async(function callee$1$4$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return xcode.getAutomationTraceTemplatePath(); | ||
case 2: | ||
path = context$2$0.sent; | ||
should.exist(path); | ||
fileExists(path).should.eventually.be['true']; | ||
suffix = '.tracetemplate'; | ||
path.slice(-suffix.length).should.equal(suffix); | ||
case 7: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this); | ||
}); | ||
it('should get max iOS SDK version', function callee$1$5() { | ||
var version; | ||
return $traceurRuntime.asyncWrap(function($ctx) { | ||
while (true) | ||
switch ($ctx.state) { | ||
case 0: | ||
Promise.resolve(xcode.getMaxIOSSDK()).then($ctx.createCallback(3), $ctx.errback); | ||
return; | ||
case 3: | ||
version = $ctx.value; | ||
$ctx.state = 2; | ||
break; | ||
case 2: | ||
should.exist(version); | ||
(typeof version).should.equal('string'); | ||
(parseFloat(version) - 6.1).should.be.at.least(0); | ||
$ctx.state = -2; | ||
break; | ||
default: | ||
return $ctx.end(); | ||
} | ||
}, this); | ||
})); | ||
})); | ||
return _regeneratorRuntime.async(function callee$1$5$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return xcode.getMaxIOSSDK(); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieGNvZGUtc3BlY3MuanMiLCJzb3VyY2VzIjpbInhjb2RlLXNwZWNzLmpzIiwiQHRyYWNldXIvZ2VuZXJhdGVkL1RlbXBsYXRlUGFyc2VyLzIiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZXIvMTUiLCJAdHJhY2V1ci9nZW5lcmF0ZWQvVGVtcGxhdGVQYXJzZX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EpLFxuICAgICAgICAkX19wbGFjZWhvbGRlcl9fMiAmJiAkX19wbGFjZWhvbGRlcl9fMy5fX2VzTW9kdWxlICYmICRfX3BsYWNlaG9sZGVyX180IHx8IHtkZWZhdWx0OiAkX19wbGFjZWhvbGRlcl9fNX0pIiwicmV0dXJuICRfX3BsYWNlaG9sZGVyX18wKFxuICAgICAgICAgICAgICAkX19wbGFjZWhvbGRlcl9fMSwgdGhpcyk7IiwiJHRyYWNldXJSdW50aW1lLmFzeW5jV3JhcCIsImZ1bmN0aW9uKCRjdHgpIHtcbiAgICAgIHdoaWxlICh0cnVlKSAkX19wbGFjZWhvbGRlcl9fMFxuICAgIH0iLCJQcm9taXNlLnJlc29sdmUoJF9fcGxhY2Vob2xkZXJfXzApLnRoZW4oXG4gICAgICAgICAgJGN0eC5jcmVhdGVDYWxsYmFjaygkX19wbGFjZWhvbGRlcl9fMSksICRjdHguZXJyYmFjayk7XG4gICAgICAgICAgcmV0dXJuOyIsIiRjdHgudmFsdWUiLCJyZXR1cm4gJGN0eC5lbmQoKSJdfQ== | ||
//# sourceURL=xcode-specs.js | ||
case 2: | ||
version = context$2$0.sent; | ||
should.exist(version); | ||
(typeof version).should.equal('string'); | ||
(parseFloat(version) - 6.1).should.be.at.least(0); | ||
case 6: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QveGNvZGUtc3BlY3MuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7c0JBRXVCLGNBQWM7O0lBQXpCLEtBQUs7O29CQUNBLE1BQU07Ozs7OEJBQ0ksa0JBQWtCOzs7O1FBQ3RDLFdBQVc7O2tCQUNILElBQUk7Ozs7eUJBQ0csV0FBVzs7Ozt1QkFDbkIsUUFBUTs7OztBQVJ0QixPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FB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nVuY3Rpb24gKCkge1xuXG4gICAgeGNvZGUuY2xlYXJJbnRlcm5hbENhY2hlKCk7XG5cbiAgICBsZXQgYmVmb3JlID0gbmV3IERhdGUoKTtcbiAgICBhd2FpdCB4Y29kZS5nZXRQYXRoKCk7XG4gICAgbGV0IGFmdGVyID0gbmV3IERhdGUoKTtcbiAgICAoYWZ0ZXItYmVmb3JlKS5zaG91bGQuYmUuYXQubGVhc3QoNyk7XG5cbiAgfSk7XG5cbiAgaXQoJ3Nob3VsZCBmaW5kIHRoZSBhdXRvbWF0aW9uIHRyYWNlIHRlbXBsYXRlJywgYXN5bmMgKCkgPT4ge1xuICAgIGxldCBwYXRoID0gYXdhaXQgeGNvZGUuZ2V0QXV0b21hdGlvblRyYWNlVGVtcGxhdGVQYXRoKCk7XG5cbiAgICBzaG91bGQuZXhpc3QocGF0aCk7XG4gICAgZmlsZUV4aXN0cyhwYXRoKS5zaG91bGQuZXZlbnR1YWxseS5iZS50cnVlO1xuICAgIGxldCBzdWZmaXggPSBcIi50cmFjZXRlbXBsYXRlXCI7XG4gICAgcGF0aC5zbGljZSgtc3VmZml4Lmxlbmd0aCkuc2hvdWxkLmVxdWFsKHN1ZmZpeCk7XG4gIH0pO1xuXG4gIGl0KCdzaG91bGQgZ2V0IG1heCBpT1MgU0RLIHZlcnNpb24nLCBhc3luYygpID0+IHtcbiAgICBsZXQgdmVyc2lvbiA9IGF3YWl0IHhjb2RlLmdldE1heElPU1NESygpO1xuXG4gICAgc2hvdWxkLmV4aXN0KHZlcnNpb24pO1xuICAgICh0eXBlb2YgdmVyc2lvbikuc2hvdWxkLmVxdWFsKCdzdHJpbmcnKTtcbiAgICAocGFyc2VGbG9hdCh2ZXJzaW9uKS02LjEpLnNob3VsZC5iZS5hdC5sZWFzdCgwKTtcbiAgfSk7XG5cbn0pO1xuIl19 |
"use strict"; | ||
var gulp = require('gulp'), | ||
merge = require('merge-stream'), | ||
mocha = require('gulp-mocha'), | ||
Q = require('q'), | ||
spawnWatcher = require('appium-gulp-plugins').spawnWatcher.use(gulp), | ||
Transpiler = require('appium-gulp-plugins').Transpiler, | ||
runSequence = Q.denodeify(require('run-sequence')), | ||
jshint = require('gulp-jshint'), | ||
jscs = require('gulp-jscs'), | ||
vinylPaths = require('vinyl-paths'), | ||
del = require('del'); | ||
boilerplate = require('appium-gulp-plugins').boilerplate.use(gulp); | ||
var argv = require('yargs') | ||
.count('prod') | ||
.argv; | ||
gulp.task('clean', function () { | ||
return gulp.src('build', {read: false}) | ||
.pipe(vinylPaths(del)); | ||
}); | ||
gulp.task('transpile', function () { | ||
var transpiler = new Transpiler(); | ||
if (!argv.prod) { | ||
transpiler.traceurOpts.typeAssertions = true; | ||
transpiler.traceurOpts.typeAssertionModule = 'rtts-assert'; | ||
} | ||
var index = gulp.src('index.js') | ||
.pipe(transpiler.stream()) | ||
.on('error', spawnWatcher.handleError) | ||
.pipe(gulp.dest('build')); | ||
var lib = gulp.src('lib/**/*.js') | ||
.pipe(transpiler.stream()) | ||
.on('error', spawnWatcher.handleError) | ||
.pipe(gulp.dest('build/lib')); | ||
var test = gulp.src('test/**/*.js') | ||
.pipe(transpiler.stream()) | ||
.on('error', spawnWatcher.handleError) | ||
.pipe(gulp.dest('build/test')); | ||
return merge(index, lib, test); | ||
}); | ||
gulp.task('jscs', function () { | ||
return gulp | ||
.src(['gulpfile.js']) | ||
.pipe(jscs()) | ||
.on('error', spawnWatcher.handleError); | ||
}); | ||
gulp.task('jshint', function () { | ||
return gulp | ||
.src(['*.js', 'lib/**/*.js', 'test/**/*.js']) | ||
.pipe(jshint()) | ||
.pipe(jshint.reporter('jshint-stylish')) | ||
.pipe(jshint.reporter('fail')) | ||
.on('error', spawnWatcher.handleError); | ||
}); | ||
gulp.task('lint',['jshint','jscs']); | ||
gulp.task('test', ['transpile'], function () { | ||
process.env.SKIP_TRACEUR_RUNTIME = true; | ||
return gulp | ||
.src('build/test/**/*-specs.js', {read: false}) | ||
.pipe(mocha({reporter: 'nyan'})) | ||
.on('error', spawnWatcher.handleError); | ||
}); | ||
process.env.APPIUM_NOTIF_BUILD_NAME = 'appium-xcode'; | ||
spawnWatcher.configure('watch', ['index.js', 'lib/**/*.js','test/**/*.js'], function () { | ||
return runSequence('clean', 'lint', 'transpile', 'test'); | ||
}); | ||
gulp.task('prepublish', function () { | ||
return runSequence('clean', 'transpile'); | ||
}); | ||
gulp.task('once', function () { | ||
return runSequence('clean','lint', 'transpile','test'); | ||
}); | ||
gulp.task('default', ['watch']); | ||
boilerplate({build: "Appium Xcode", jscs: false}); |
@@ -132,3 +132,3 @@ import npmlog from 'npmlog'; | ||
const getVersion = _.memoize( | ||
async function (retries = DEFAULT_NUMBER_OF_RETRIES) { | ||
function (retries = DEFAULT_NUMBER_OF_RETRIES) { | ||
return retry(retries, getVersionWithoutRetry); | ||
@@ -168,3 +168,3 @@ } | ||
const getAutomationTraceTemplatePath = _.memoize( | ||
async function (retries = DEFAULT_NUMBER_OF_RETRIES) { | ||
function (retries = DEFAULT_NUMBER_OF_RETRIES) { | ||
return retry(retries, getAutomationTraceTemplatePathWithoutRetry); | ||
@@ -171,0 +171,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"author": "appium", | ||
@@ -28,10 +28,9 @@ "license": "Apache License 2.0", | ||
"appium-support": "^1.0.0", | ||
"appium-transpile-runtime": "^0.0.4", | ||
"asyncbox": "^1.0.9", | ||
"chai": "^2.1.2", | ||
"chai-as-promised": "^4.3.0", | ||
"asyncbox": "^2.0.2", | ||
"babel-runtime": "^5.0.12", | ||
"denodeify": "^1.2.1", | ||
"lodash": "^3.6.0", | ||
"npmlog": "^1.2.0", | ||
"q": "^1.2.0" | ||
"q": "^1.2.0", | ||
"source-map-support": "^0.2.10" | ||
}, | ||
@@ -44,19 +43,8 @@ "scripts": { | ||
"devDependencies": { | ||
"appium-gulp-plugins": "^0.0.10", | ||
"chai": "^1.10.0", | ||
"chai-as-promised": "^4.1.1", | ||
"del": "^1.1.1", | ||
"appium-gulp-plugins": "^1.0.3", | ||
"chai": "^2.2.0", | ||
"chai-as-promised": "^4.3.0", | ||
"gulp": "^3.8.10", | ||
"gulp-jscs": "^1.3.1", | ||
"gulp-jshint": "https://github.com/appium/gulp-jshint/archive/master.tar.gz", | ||
"gulp-mocha": "^2.0.0", | ||
"jshint-stylish": "^1.0.0", | ||
"lodash": "^3.6.0", | ||
"merge-stream": "^0.1.6", | ||
"mocha": "^2.1.0", | ||
"mochawait": "^1.1.0", | ||
"run-sequence": "^1.0.2", | ||
"vinyl-paths": "^1.0.0", | ||
"yargs": "^1.3.3" | ||
"mochawait": "^2.0.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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
8
5
17
8
74029
681
5
+ Addedbabel-runtime@^5.0.12
+ Addedsource-map-support@^0.2.10
+ Added@types/bluebird@3.5.42(transitive)
+ Addedasyncbox@2.9.4(transitive)
+ Addedbabel-runtime@5.8.38(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcore-js@1.2.7(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
- Removedappium-transpile-runtime@^0.0.4
- Removedchai@^2.1.2
- Removedchai-as-promised@^4.3.0
- Removedappium-transpile-runtime@0.0.4(transitive)
- Removedassertion-error@1.0.0(transitive)
- Removedast-types@0.5.7(transitive)
- Removedasyncbox@1.0.9(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchai@2.3.0(transitive)
- Removedchai-as-promised@4.3.0(transitive)
- Removedcls@0.1.5(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddeep-eql@0.1.3(transitive)
- Removeddepd@1.0.1(transitive)
- Removedes6-mapify@1.0.2(transitive)
- Removedesprima-fb@7001.1.0-dev-harmony-fb(transitive)
- Removedglob@4.3.54.5.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedjsesc@0.5.0(transitive)
- Removedminimatch@2.0.10(transitive)
- Removedonce@1.4.0(transitive)
- Removedprivate@0.1.8(transitive)
- Removedrecast@0.8.8(transitive)
- Removedregenerate@1.4.2(transitive)
- Removedregexpu@0.3.0(transitive)
- Removedregjsgen@0.2.0(transitive)
- Removedregjsparser@0.1.5(transitive)
- Removedrsvp@3.6.2(transitive)
- Removedsemver@2.3.2(transitive)
- Removedtraceur@0.0.740.0.79(transitive)
- Removedtype-detect@0.1.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedasyncbox@^2.0.2