appium-support
Advanced tools
Comparing version 2.0.0-beta23 to 2.0.0-beta25
@@ -27,6 +27,2 @@ 'use strict'; | ||
var _libRimraf = require('./lib/rimraf'); | ||
var _libRimraf2 = _interopRequireDefault(_libRimraf); | ||
var _libPlist = require('./lib/plist'); | ||
@@ -40,4 +36,4 @@ | ||
// until JSHint figures out how to parse that pattern | ||
exports['default'] = { tempDir: tempDir, system: system, util: util, fs: _libFs2['default'], rimraf: _libRimraf2['default'], cancellableDelay: _libUtil.cancellableDelay, plist: plist, mkdirp: _libMkdirp.mkdirp }; | ||
exports['default'] = { tempDir: tempDir, system: system, util: util, fs: _libFs2['default'], cancellableDelay: _libUtil.cancellableDelay, plist: plist, mkdirp: _libMkdirp.mkdirp }; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7MEJBQXlCLGVBQWU7O0lBQTVCLE9BQU87O3lCQUNLLGNBQWM7O0lBQTFCLE1BQU07O3VCQUNJLFlBQVk7O0lBQXRCLElBQUk7O3FCQUVELFVBQVU7Ozs7eUJBQ04sY0FBYzs7Ozt3QkFDVixhQUFhOztJQUF4QixLQUFLOzt5QkFDTSxjQUFjOzs7O3FCQUl0QixFQUFFLE9BQU8sRUFBUCxPQUFPLEVBQUUsTUFBTSxFQUFOLE1BQU0sRUFBRSxJQUFJLEVBQUosSUFBSSxFQUFFLEVBQUUsb0JBQUEsRUFBRSxNQUFNLHdCQUFBLEVBQUUsZ0JBQWdCLDJCQUFBLEVBQUUsS0FBSyxFQUFMLEtBQUssRUFBRSxNQUFNLG1CQUFBLEVBQUUiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyB0ZW1wRGlyIGZyb20gJy4vbGliL3RlbXBkaXInO1xuaW1wb3J0ICogYXMgc3lzdGVt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JmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyB0ZW1wRGlyIGZyb20gJy4vbGliL3RlbXBkaXInO1xuaW1wb3J0ICogYXMgc3lzdGVtIGZyb20gJy4vbGliL3N5c3RlbSc7XG5pbXBvcnQgKiBhcyB1dGlsIGZyb20gJy4vbGliL3V0aWwnO1xuaW1wb3J0IHsgY2FuY2VsbGFibGVEZWxheSB9IGZyb20gJy4vbGliL3V0aWwnO1xuaW1wb3J0IGZzIGZyb20gJy4vbGliL2ZzJztcbmltcG9ydCAqIGFzIHBsaXN0IGZyb20gJy4vbGliL3BsaXN0JztcbmltcG9ydCB7IG1rZGlycCB9IGZyb20gJy4vbGliL21rZGlycCc7XG5cbi8vIGNhbid0IGFkZCB0byBvdGhlciBleHBvcnRzIGBhcyBkZWZhdWx0YFxuLy8gdW50aWwgSlNIaW50IGZpZ3VyZXMgb3V0IGhvdyB0byBwYXJzZSB0aGF0IHBhdHRlcm5cbmV4cG9ydCBkZWZhdWx0IHsgdGVtcERpciwgc3lzdGVtLCB1dGlsLCBmcywgY2FuY2VsbGFibGVEZWxheSwgcGxpc3QsIG1rZGlycCB9O1xuIl19 |
@@ -17,16 +17,14 @@ 'use strict'; | ||
var _rimraf = require('./rimraf'); | ||
var _rimraf = require('rimraf'); | ||
var _rimraf2 = _interopRequireDefault(_rimraf); | ||
var _util = require('./util'); | ||
var _md52 = require('md5'); | ||
var _MD5 = require('MD5'); | ||
var _md53 = _interopRequireDefault(_md52); | ||
var _MD52 = _interopRequireDefault(_MD5); | ||
var _ncp = require('ncp'); | ||
var _ncp2 = require('ncp'); | ||
var _ncp2 = _interopRequireDefault(_ncp); | ||
var _ncp3 = _interopRequireDefault(_ncp2); | ||
var _bluebird = require('bluebird'); | ||
@@ -66,8 +64,56 @@ | ||
}, | ||
rimraf: _rimraf2['default'], | ||
mkdir: _util.mkdir, | ||
copyFile: _bluebird2['default'].promisify(_ncp3['default']) | ||
rimraf: _bluebird2['default'].promisify(_rimraf2['default']), | ||
mkdir: function mkdir(dirName) { | ||
var _mkdir; | ||
return _regeneratorRuntime.async(function mkdir$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
_mkdir = _bluebird2['default'].promisify(_fs3['default'].mkdir); | ||
context$1$0.prev = 1; | ||
context$1$0.next = 4; | ||
return _regeneratorRuntime.awrap(_mkdir(dirName)); | ||
case 4: | ||
context$1$0.next = 10; | ||
break; | ||
case 6: | ||
context$1$0.prev = 6; | ||
context$1$0.t0 = context$1$0['catch'](1); | ||
if (!(context$1$0.t0 && context$1$0.t0.code !== "EEXIST")) { | ||
context$1$0.next = 10; | ||
break; | ||
} | ||
throw context$1$0.t0; | ||
case 10: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this, [[1, 6]]); | ||
}, | ||
copyFile: _bluebird2['default'].promisify(_ncp2['default']), | ||
md5: function md5(filePath) { | ||
return _regeneratorRuntime.async(function md5$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return _regeneratorRuntime.awrap(fs.readFile(filePath)); | ||
case 2: | ||
context$1$0.t0 = context$1$0.sent; | ||
return context$1$0.abrupt('return', (0, _md53['default'])(context$1$0.t0)); | ||
case 4: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
}; | ||
var simples = ['open', 'close', 'mkdir', 'access', 'readFile', 'writeFile', 'write', 'readlink', 'chmod', 'unlink', 'readdir', 'stat', 'rename']; | ||
var simples = ['open', 'close', 'access', 'readFile', 'writeFile', 'write', 'readlink', 'chmod', 'unlink', 'readdir', 'stat', 'rename']; | ||
@@ -99,22 +145,4 @@ var _iteratorNormalCompletion = true; | ||
fs.md5 = function callee$0$0(filePath) { | ||
return _regeneratorRuntime.async(function callee$0$0$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return _regeneratorRuntime.awrap(fs.readFile(filePath)); | ||
case 2: | ||
context$1$0.t0 = context$1$0.sent; | ||
return context$1$0.abrupt('return', (0, _MD52['default'])(context$1$0.t0)); | ||
case 4: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
}; | ||
exports['default'] = fs; | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9mcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7bUJBQWdCLElBQUk7Ozs7c0JBQ0QsVUFBVTs7OztvQkFDUCxRQUFROzttQkFDYixLQUFLOzs7O29CQUNMLEtBQUs7Ozs7d0JBQ1IsVUFBVTs7OztBQUd4QixJQUFJLEVBQUUsR0FBRztBQUNQLFdBQVMsRUFBRSxtQkFBZ0IsSUFBSTs7Ozs7OzJDQUVyQixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxFQUFFLENBQUMsSUFBSSxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUM7Ozs7Ozs7Ozs4Q0FFbkMsS0FBSzs7OzhDQUVQLElBQUk7Ozs7Ozs7R0FDWjtBQUNELFFBQU0sRUFBRSxnQkFBVSxJQUFJLEVBQUU7QUFBRSxXQUFPLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLENBQUM7R0FBRTtBQUN4RCxRQUFNLHFCQUFBO0FBQ04sT0FBSyxhQUFBO0FBQ0wsVUFBUSxFQUFFLHNCQUFFLFNBQVMsa0JBQU07Q0FDNUIsQ0FBQzs7QUFFRixJQUFNLE9BQU8sR0FBRyxDQUFDLE1BQU0sRUFBRSxPQUFPLEVBQUUsT0FBTyxFQUFFLFFBQVEsRUFBRSxVQUFVLEVBQUUsV0FBVyxFQUMzRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE9BQU8sRUFBRSxRQUFRL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10gPSBCLnByb21pc2lmeShfZnNbc10pO1xufVxuXG5leHBvcnQgZGVmYXVsdCBmcztcbiJdfQ== |
@@ -17,4 +17,4 @@ 'use strict'; | ||
var mkdirp = _bluebird2['default'].promisify(_mkdirp3['default']); | ||
var mkdirp = _bluebird2['default'].promisify(_mkdirp3['default']).mkdirp; | ||
exports.mkdirp = mkdirp; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9ta2RpcnAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7dUJBQW9CLFFBQVE7Ozs7d0JBQ2QsVUFBVTs7OztBQUV4QixJQUFJLE1BQU0sR0FBRyxzQkFBRSxTQUFTLHFCQUFTLENBQUM7UUFDekIsTUFBTSxHQUFOLE1BQU0iLCJmaWxlIjoibGliL21rZGlycC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBfbWtkaXJwIGZyb20gJ21rZGlycCc7XG5pbXBvcnQgQiBmcm9tICdibHVlYmlyZCc7XG5cbmxldCBta2RpcnAgPSBCLnByb21pc2lmeShfbWtkaXJwKTtcbmV4cG9ydCB7IG1rZGlycCB9O1xuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9ta2RpcnAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7dUJBQW9CLFFBQVE7Ozs7d0JBQ2QsVUFBVTs7OztBQUV4QixJQUFJLE1BQU0sR0FBRyxzQkFBRSxTQUFTLHFCQUFTLENBQUMsTUFBTSxDQUFDO1FBQ2hDLE1BQU0sR0FBTixNQUFNIiwiZmlsZSI6ImxpYi9ta2RpcnAuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgX21rZGlycCBmcm9tICdta2RpcnAnO1xuaW1wb3J0IEIgZnJvbSAnYmx1ZWJpcmQnO1xuXG5sZXQgbWt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XQgaXM2NCA9IHRoaXMuaXNPU1dpbjY0KCk7XG4gICAgcmV0dXJuIGlzNjQgPyAnNjQnIDogJzMyJztcbiAgfVxufVxuXG5leHBvcnQgeyBpc1dpbmRvd3MsIGlzTWFjLCBpc0xpbnV4LCBpc09TV2luNjQsIGFyY2ggfTtcbiJdfQ== |
@@ -12,5 +12,5 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
var _fs2 = require('fs'); | ||
var _fs = require('./fs'); | ||
var _fs3 = _interopRequireDefault(_fs2); | ||
var _fs2 = _interopRequireDefault(_fs); | ||
@@ -29,6 +29,2 @@ var _os = require('os'); | ||
var _bluebird = require('bluebird'); | ||
var _bluebird2 = _interopRequireDefault(_bluebird); | ||
var _logger = require('./logger'); | ||
@@ -38,13 +34,6 @@ | ||
var _util = require('./util'); | ||
var fs = { | ||
open: _bluebird2['default'].promisify(_fs3['default'].open), | ||
mkdir: _bluebird2['default'].promisify(_fs3['default'].mkdir) | ||
}; | ||
var RDWR_EXCL = _constants2['default'].O_CREAT | _constants2['default'].O_TRUNC | _constants2['default'].O_RDWR | _constants2['default'].O_EXCL; | ||
function tempDir() { | ||
var now, filePath, exists; | ||
var now, filePath; | ||
return _regeneratorRuntime.async(function tempDir$(context$1$0) { | ||
@@ -55,15 +44,10 @@ while (1) switch (context$1$0.prev = context$1$0.next) { | ||
filePath = _path2['default'].join(_os2['default'].tmpDir(), [now.getFullYear(), now.getMonth(), now.getDate(), '-', process.pid, '-', (Math.random() * 0x100000000 + 1).toString(36)].join('')); | ||
context$1$0.next = 4; | ||
return _regeneratorRuntime.awrap((0, _util.hasAccess)(filePath)); | ||
case 4: | ||
exists = context$1$0.sent; | ||
// creates a temp directory using the date and a random string | ||
// testing its accessibility to determine if the file exists already | ||
if (!exists) { | ||
fs.mkdir(filePath); | ||
} | ||
_fs2['default'].mkdir(filePath); | ||
return context$1$0.abrupt('return', filePath); | ||
case 7: | ||
case 4: | ||
case 'end': | ||
@@ -108,3 +92,3 @@ return context$1$0.stop(); | ||
context$1$0.next = 6; | ||
return _regeneratorRuntime.awrap(fs.open(filePath, RDWR_EXCL, 384)); | ||
return _regeneratorRuntime.awrap(_fs2['default'].open(filePath, RDWR_EXCL, 384)); | ||
@@ -168,5 +152,3 @@ case 6: | ||
// creates a temp directory using the date and a random string | ||
// opens the file in mode 384 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi90ZW1wZGlyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O21CQUNnQixJQUFJOzs7O2tCQUNMLElBQUk7Ozs7b0JBQ0UsTUFBTTs7Ozt5QkFDVixXQUFXOzs7O3dCQUNkLFVBQVU7Ozs7c0JBQ1IsVUFBVTs7OztvQkFHQSxRQUFROztBQUNsQyxJQUFJLEVBQUUsR0FBRztBQUNQLE1BQUksRUFBRSxzQkFBRSxTQUFTLENBQUMsZ0JBQUksSUFBSSxDQUFDO0FBQzNCLE9BQUssRUFBRSxzQkFBRSxTQUFTLENBQUMsZ0JBQUksS0FBSyxDQUFDO0NBQzlCLENBQUM7O0FBRUYsSUFBTSxTQUFTLEdBQUcsdUJBQUssT0FBTyxHQUFHLHVCQUFLLE9BQU8sR0FBRyx1QkFBSyxNQUFNLEdBQUcsdUJBQUssTUFBTSxDQUFDOztBQUUxRSxTQUFlLE9BQU87TUFDaEIsR0FBRyxFQUNILFFBQVEsRUFRUixNQUFNOzs7O0FBVE4sV0FBRyxHQUFHLElBQUksSUFBSSxFQUFFO0FBQ2hCLGdCQUFRLEdBQUcsa0JBQVMsSUFBSSxDQUFDLGdCQUFHLE1BQU0sRUFBRSxFQUN0QyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEVBQUUsRUFBRSxHQUFHLENBQUMsUUFBUSxFQUFFLEVBQUUsR0FBRyxDQUFDLE9BQU8sRUFBRSxFQUNqRCxHQUFHLEVBQ0gsT0FBTyxDQUFDLEdBQU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gdGVtcERpcigpO1xuY29uc3Qgb3BlbkRpciA9IHRlbXBEaXI7XG5cbmFzeW5jIGZ1bmN0aW9uIHN0YXRpY0RpciAoKSB7XG4gIHJldHVybiBfc3RhdGljO1xufVxuXG5leHBvcnQgeyBvcGVuLCBwYXRoLCBvcGVuRGlyLCBzdGF0aWNEaXIgfTtcbiJdfQ== |
'use strict'; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
@@ -24,6 +22,2 @@ | ||
var _fs = require('./fs'); | ||
var _fs2 = _interopRequireDefault(_fs); | ||
var _path = require('path'); | ||
@@ -70,47 +64,2 @@ | ||
// promise which resolve strue if program has access to read the path passed in, | ||
// false otherwise | ||
function hasAccess(path) { | ||
return _regeneratorRuntime.async(function hasAccess$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
return context$1$0.abrupt('return', _fs2['default'].hasAccess(path)); | ||
case 1: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
function mkdir(dirName) { | ||
return _regeneratorRuntime.async(function mkdir$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.prev = 0; | ||
context$1$0.next = 3; | ||
return _regeneratorRuntime.awrap(_fs2['default'].mkdir(dirName)); | ||
case 3: | ||
context$1$0.next = 9; | ||
break; | ||
case 5: | ||
context$1$0.prev = 5; | ||
context$1$0.t0 = context$1$0['catch'](0); | ||
if (!(context$1$0.t0 && context$1$0.t0.code !== "EEXIST")) { | ||
context$1$0.next = 9; | ||
break; | ||
} | ||
throw context$1$0.t0; | ||
case 9: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this, [[0, 5]]); | ||
} | ||
function localIp() { | ||
@@ -152,9 +101,5 @@ var ip = _lodash2['default'].chain(_os2['default'].networkInterfaces()).values().flatten().filter(function (val) { | ||
exports.escapeSpecialChars = escapeSpecialChars; | ||
exports.hasAccess = hasAccess; | ||
exports.mkdir = mkdir; | ||
exports.localIp = localIp; | ||
exports.cancellableDelay = cancellableDelay; | ||
exports.multiResolve = multiResolve; | ||
// TODO: deprecate, use fs.hasAccess instead | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi91dGlsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O3dCQUFjLFVBQVU7Ozs7c0JBQ1YsUUFBUTs7OztrQkFDUCxJQUFJOzs7O2tCQUNKLE1BQU07Ozs7b0JBQ0osTUFBTTs7OztBQUVoQixTQUFTLFVBQVUsQ0FBRSxHQUFHLEVBQUU7QUFDL0IsU0FBTyxvQkFBRSxRQUFRLENBQUMsR0FBRyxDQUFDLElBQUksR0FBRyxLQUFLLEVBQUUsQ0FBQztDQUN0Qzs7O0FBR0QsU0FBUyxRQUFRLENBQUUsR0FBRyxFQUFFO0FBQ3RCLE1BQUksTUFBTSxHQUFHLEtBQUssQ0FBQzs7QUFFbkIsTUFBSSxvQkFBRSxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUU7QUFDbkIsVUFBTSxHQUFHLENBQUMsb0JBQUUsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0dBQ3hCLE1BQU07QUFDTCxVQUFNLEdBQUcsQ0FBQyxvQkFBRSxXQUFXLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxvQkFBRSxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7R0FDaEQ7O0FBRUQsU0FBTyxNQUFNLENBQUM7Q0FDZjs7O0FBR0QsU0FBUyxXQUFXLENBQUUsR0FBRyxFQUFFO0FBQ3pCLFNBQU8sR0FBRyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7Q0FDbkM7O0FBRUQsU0FBUyxrQk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GlvbkVycm9yLCAoZXJyKSA9PiB7XG4gICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICB0aHJvdyBlcnI7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiBtdWx0aVJlc29sdmUgKHJvb3RzLCAuLi5hcmdzKSB7XG4gIHJldHVybiByb290cy5tYXAoKHJvb3QpID0+IHtcbiAgICByZXR1cm4gcGF0aC5yZXNvbHZlKHJvb3QsIC4uLmFyZ3MpO1xuICB9KTtcbn1cblxuZXhwb3J0IHsgaGFzVmFsdWUsIGVzY2FwZVNwYWNlLCBlc2NhcGVTcGVjaWFsQ2hhcnMsIGxvY2FsSXAsIGNhbmNlbGxhYmxlRGVsYXksIG11bHRpUmVzb2x2ZSB9O1xuIl19 |
@@ -37,2 +37,70 @@ 'use strict'; | ||
describe("mkdir", function () { | ||
var dirName = _path2['default'].resolve(__dirname, "tmp"); | ||
it("should make a directory that doesn't exist", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.fs.rimraf(dirName)); | ||
case 2: | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(_.fs.mkdir(dirName)); | ||
case 4: | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(_.fs.hasAccess(dirName)); | ||
case 6: | ||
exists = context$3$0.sent; | ||
exists.should.be['true']; | ||
case 8: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it("should not complain if the dir already exists", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.fs.hasAccess(dirName)); | ||
case 2: | ||
exists = context$3$0.sent; | ||
exists.should.be['true']; | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(_.fs.mkdir(dirName)); | ||
case 6: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it("should still throw an error if something else goes wrong", function callee$2$0() { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.fs.mkdir("/bin/foo").should.be.rejected); | ||
case 2: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
}); | ||
it('hasAccess', function callee$1$0() { | ||
@@ -193,2 +261,2 @@ var existingPath, nonExistingPath; | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvZnMtc3BlY3MuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O2dCQUNtQixPQUFPOztvQkFDVCxNQUFNOzs7O29CQUNOLE1BQU07Ozs7QUFFdkIsSUFBSSxNQUFNLEdBQUcsa0JBQUssTUFBTSxFQUFFLENBQUM7O0FBRTNCLFFBQVEsQ0FBQyxJQUFJLEVBQUUsWUFBWTs7O0FBQ3pCLElBQUUsQ0FBQyxjQUFjLEVBQUUsWUFBWTtBQUM3QixVQUFNLENBQUMsS0FBSyxNQUFJLENBQUM7R0FDbEIsQ0FBQyxDQUFDO0FBQ0gsSUFBRSxDQUFDLDhCQUE4QixFQUFFLFlBQVk7QUFDN0MsVUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFHLElBQUksQ0FBQyxDQUFDO0FBQ3RCLFVBQU0sQ0FBQyxLQUFLLENBQUMsS0FBRyxLQUFLLENBQUMsQ0FBQztBQUN2QixVQUFNLENBQUMsS0FBSyxDQUFDLEtBQUcsTUFBTSxDQUFDLENBQUM7QUFDeEIsVUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFHLEtBQU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gZnMuc3RhdChleGlzdGluZ1BhdGgpO1xuICAgIHN0YXQuc2hvdWxkLmhhdmUucHJvcGVydHkoJ2F0aW1lJyk7XG4gIH0pO1xufSk7XG4iXX0= |
@@ -9,10 +9,2 @@ 'use strict'; | ||
var _rimraf2 = require('rimraf'); | ||
var _rimraf3 = _interopRequireDefault(_rimraf2); | ||
var _path = require('path'); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _chai = require('chai'); | ||
@@ -34,3 +26,2 @@ | ||
var rimraf = _bluebird2['default'].promisify(_rimraf3['default']); | ||
var should = _chai2['default'].should(); | ||
@@ -145,44 +136,2 @@ _chai2['default'].use(_chaiAsPromised2['default']); | ||
describe("fileExists", function () { | ||
it("should return true if file is readable", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.util.hasAccess('/')); | ||
case 2: | ||
exists = context$3$0.sent; | ||
exists.should.be['true']; | ||
case 4: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it("should return false if file does not exist", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.util.hasAccess('chuckwudi')); | ||
case 2: | ||
exists = context$3$0.sent; | ||
exists.should.be['false']; | ||
case 4: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
}); | ||
describe("localIp", function () { | ||
@@ -197,70 +146,2 @@ it("should find a local ip address", function () { | ||
describe("mkdir", function () { | ||
var dirName = _path2['default'].resolve(__dirname, "tmp"); | ||
it("should make a directory that doesn't exist", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(rimraf(dirName)); | ||
case 2: | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(_.util.mkdir(dirName)); | ||
case 4: | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(_.util.hasAccess(dirName)); | ||
case 6: | ||
exists = context$3$0.sent; | ||
exists.should.be['true']; | ||
case 8: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it("should not complain if the dir already exists", function callee$2$0() { | ||
var exists; | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.util.hasAccess(dirName)); | ||
case 2: | ||
exists = context$3$0.sent; | ||
exists.should.be['true']; | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(_.util.mkdir(dirName)); | ||
case 6: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
it("should still throw an error if something else goes wrong", function callee$2$0() { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(_.util.mkdir("/bin/foo").should.be.rejected); | ||
case 2: | ||
case 'end': | ||
return context$3$0.stop(); | ||
} | ||
}, null, this); | ||
}); | ||
}); | ||
describe("cancellableDelay", function () { | ||
@@ -301,2 +182,2 @@ it("should delay", function callee$2$0() { | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvdXRpbC1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Z0JBQ3FCLE9BQU87O3VCQUNSLFFBQVE7Ozs7b0J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xheS5zaG91bGQuYmUucmVqZWN0ZWRXaXRoKC9jYW5jZWxsYXRpb24gZXJyb3IvKTtcbiAgICB9KTtcbiAgfSk7XG59KTtcbiJdfQ== |
@@ -6,3 +6,2 @@ import * as tempDir from './lib/tempdir'; | ||
import fs from './lib/fs'; | ||
import rimraf from './lib/rimraf'; | ||
import * as plist from './lib/plist'; | ||
@@ -13,2 +12,2 @@ import { mkdirp } from './lib/mkdirp'; | ||
// until JSHint figures out how to parse that pattern | ||
export default { tempDir, system, util, fs, rimraf, cancellableDelay, plist, mkdirp }; | ||
export default { tempDir, system, util, fs, cancellableDelay, plist, mkdirp }; |
import _fs from 'fs'; | ||
import rimraf from './rimraf'; | ||
import { mkdir } from './util'; | ||
import _md5 from 'MD5'; | ||
import _ncp from 'ncp'; | ||
import rimraf from 'rimraf'; | ||
import md5 from 'md5'; | ||
import ncp from 'ncp'; | ||
import B from 'bluebird'; | ||
let fs = { | ||
@@ -19,8 +17,20 @@ hasAccess: async function (path) { | ||
exists: function (path) { return this.hasAccess(path); }, | ||
rimraf, | ||
mkdir, | ||
copyFile: B.promisify(_ncp) | ||
rimraf: B.promisify(rimraf), | ||
mkdir: async function (dirName) { | ||
let _mkdir = B.promisify(_fs.mkdir); | ||
try { | ||
await _mkdir(dirName); | ||
} catch (err) { | ||
if (err && err.code !== "EEXIST") { | ||
throw err; | ||
} | ||
} | ||
}, | ||
copyFile: B.promisify(ncp), | ||
md5: async function (filePath) { | ||
return md5(await fs.readFile(filePath)); | ||
} | ||
}; | ||
const simples = ['open', 'close', 'mkdir', 'access', 'readFile', 'writeFile', | ||
const simples = ['open', 'close', 'access', 'readFile', 'writeFile', | ||
'write', 'readlink', 'chmod', 'unlink', 'readdir', 'stat', 'rename']; | ||
@@ -32,6 +42,2 @@ | ||
fs.md5 = async function (filePath) { | ||
return _md5(await fs.readFile(filePath)); | ||
}; | ||
export default fs; |
import _mkdirp from 'mkdirp'; | ||
import B from 'bluebird'; | ||
let mkdirp = B.promisify(_mkdirp); | ||
let mkdirp = B.promisify(_mkdirp).mkdirp; | ||
export { mkdirp }; |
@@ -1,2 +0,1 @@ | ||
import { exec } from 'teen_process'; | ||
@@ -21,12 +20,12 @@ import os from 'os'; | ||
async function arch () { | ||
async function arch () { | ||
if (isLinux() || isMac()) { | ||
let {stdout} = await exec('uname', ['-m']); | ||
return stdout.trim() === 'i686' ? '32' : '64'; | ||
return stdout.trim() === 'i686' ? '32' : '64'; | ||
} else if (isWindows()) { | ||
let is64 = this.isOSWin64(); | ||
return is64 ? '64' : '32'; | ||
return is64 ? '64' : '32'; | ||
} | ||
} | ||
export { isWindows, isMac, isLinux, isOSWin64, arch }; | ||
export { isWindows, isMac, isLinux, isOSWin64, arch }; |
/* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
import _fs from 'fs'; | ||
import fs from './fs'; | ||
import os from 'os'; | ||
import nodePath from 'path'; | ||
import cnst from 'constants'; | ||
import B from 'bluebird'; | ||
import log from './logger'; | ||
import { hasAccess } from './util'; | ||
let fs = { | ||
open: B.promisify(_fs.open), | ||
mkdir: B.promisify(_fs.mkdir) | ||
}; | ||
const RDWR_EXCL = cnst.O_CREAT | cnst.O_TRUNC | cnst.O_RDWR | cnst.O_EXCL; | ||
@@ -28,7 +20,4 @@ | ||
let exists = await hasAccess(filePath); | ||
// testing its accessibility to determine if the file exists already | ||
if (!exists) { | ||
fs.mkdir(filePath); | ||
} | ||
fs.mkdir(filePath); | ||
return filePath; | ||
@@ -35,0 +24,0 @@ } |
import B from 'bluebird'; | ||
import _ from 'lodash'; | ||
import os from 'os'; | ||
import fs from './fs'; | ||
import path from 'path'; | ||
@@ -53,19 +52,2 @@ | ||
// promise which resolve strue if program has access to read the path passed in, | ||
// false otherwise | ||
async function hasAccess (path) { | ||
// TODO: deprecate, use fs.hasAccess instead | ||
return fs.hasAccess(path); | ||
} | ||
async function mkdir (dirName) { | ||
try { | ||
await fs.mkdir(dirName); | ||
} catch (err) { | ||
if (err && err.code !== "EEXIST") { | ||
throw err; | ||
} | ||
} | ||
} | ||
function localIp () { | ||
@@ -108,2 +90,2 @@ let ip = _.chain(os.networkInterfaces()) | ||
export { hasValue, escapeSpace, escapeSpecialChars, hasAccess, mkdir, localIp, cancellableDelay, multiResolve }; | ||
export { hasValue, escapeSpace, escapeSpecialChars, localIp, cancellableDelay, multiResolve }; |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "2.0.0-beta23", | ||
"version": "2.0.0-beta25", | ||
"author": "appium", | ||
@@ -27,7 +27,7 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"MD5": "^1.3.0", | ||
"appium-logger": "^1.0.0", | ||
"babel-runtime": "=5.5.5", | ||
"md5": "^2.0.0", | ||
"appium-logger": "^2.0.0", | ||
"babel-runtime": "=5.8.24", | ||
"bluebird": "^2.9.25", | ||
"bplist-creator": "0.0.6", | ||
"bplist-creator": "^0.0.6", | ||
"bplist-parser": "^0.1.0", | ||
@@ -51,5 +51,5 @@ "lodash": "^3.10.0", | ||
"chai-as-promised": "^5.1.0", | ||
"gulp": "^3.8.11", | ||
"gulp": "^3.9.0", | ||
"sinon": "^1.0.0" | ||
} | ||
} |
@@ -0,5 +1,51 @@ | ||
[![Coverage Status](https://coveralls.io/repos/appium/appium-support/badge.svg?branch=master&service=github)](https://coveralls.io/github/appium/appium-support?branch=master) | ||
#appium-support | ||
Used to support libs used across appium packages. | ||
Utility functions used to support libs used across appium packages. | ||
`npm install appium-support` | ||
Appium, as of version 1.5 is all based on promises, so this module provides promise wrappers for some common operations. | ||
Most notably, we wrap `fs` for file system commands. Note the addition of `hasAccess`. | ||
Also note that `fs.mkdir` doesn't throw an error if the directory already exists, it will just resolve. | ||
###Methods | ||
system.isWindows | ||
system.isMac | ||
system.isLinux | ||
system.isOSWin64 | ||
system.arch | ||
util.hasContent - returns true if input string has content | ||
util.hasValue - returns true if input value is not undefined and no null | ||
util.escapeSpace | ||
util.escapeSpecialChars | ||
util.localIp | ||
util.cancellableDelay | ||
util.multiResolve - multiple path.resolve | ||
*fs.hasAccess* - use this over `fs.access` | ||
*fs.exists* - calls `fs.hasAccess` | ||
*fs.rimraf* | ||
*fs.mkdir* - doesn't throw an error if directory already exists | ||
*fs.copyFile* | ||
fs.open | ||
fs.close | ||
fs.access | ||
fs.readFile | ||
fs.writeFile | ||
fs.write | ||
fs.readlink | ||
fs.chmod | ||
fs.unlink | ||
fs.readdir | ||
fs.stat | ||
fs.rename | ||
*fs.md5* | ||
plist.parsePlistFile | ||
plist.updatePlistFile | ||
mkdirp |
@@ -24,2 +24,23 @@ | ||
describe("mkdir", function () { | ||
let dirName = path.resolve(__dirname, "tmp"); | ||
it("should make a directory that doesn't exist", async function () { | ||
await fs.rimraf(dirName); | ||
await fs.mkdir(dirName); | ||
let exists = await fs.hasAccess(dirName); | ||
exists.should.be.true; | ||
}); | ||
it("should not complain if the dir already exists", async function () { | ||
let exists = await fs.hasAccess(dirName); | ||
exists.should.be.true; | ||
await fs.mkdir(dirName); | ||
}); | ||
it("should still throw an error if something else goes wrong", async function () { | ||
await fs.mkdir("/bin/foo").should.be.rejected; | ||
}); | ||
}); | ||
it('hasAccess', async () => { | ||
@@ -63,2 +84,1 @@ let existingPath = path.resolve(__dirname, 'fs-specs.js'); | ||
}); | ||
import { util } from '../..'; | ||
import _rimraf from 'rimraf'; | ||
import path from 'path'; | ||
import chai from 'chai'; | ||
@@ -10,3 +8,2 @@ import chaiAsPromised from 'chai-as-promised'; | ||
let rimraf = B.promisify(_rimraf); | ||
let should = chai.should(); | ||
@@ -121,15 +118,2 @@ chai.use(chaiAsPromised); | ||
describe("fileExists", function () { | ||
it("should return true if file is readable", async function () { | ||
let exists = await util.hasAccess('/'); | ||
exists.should.be.true; | ||
}); | ||
it("should return false if file does not exist", async function () { | ||
let exists = await util.hasAccess('chuckwudi'); | ||
exists.should.be.false; | ||
}); | ||
}); | ||
describe("localIp", function () { | ||
@@ -144,23 +128,2 @@ it("should find a local ip address", function () { | ||
describe("mkdir", function () { | ||
let dirName = path.resolve(__dirname, "tmp"); | ||
it("should make a directory that doesn't exist", async function () { | ||
await rimraf(dirName); | ||
await util.mkdir(dirName); | ||
let exists = await util.hasAccess(dirName); | ||
exists.should.be.true; | ||
}); | ||
it("should not complain if the dir already exists", async function () { | ||
let exists = await util.hasAccess(dirName); | ||
exists.should.be.true; | ||
await util.mkdir(dirName); | ||
}); | ||
it("should still throw an error if something else goes wrong", async function () { | ||
await util.mkdir("/bin/foo").should.be.rejected; | ||
}); | ||
}); | ||
describe("cancellableDelay", function () { | ||
@@ -177,2 +140,1 @@ it("should delay", async function () { | ||
}); | ||
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
52
4
130722
38
1861
+ Addedmd5@^2.0.0
+ Addedappium-logger@2.1.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedmd5@2.3.0(transitive)
+ Addednpmlog@2.0.4(transitive)
- RemovedMD5@^1.3.0
- RemovedMD5@1.3.0(transitive)
- Removedappium-logger@1.1.7(transitive)
- Removedare-we-there-yet@1.0.6(transitive)
- Removednpmlog@1.2.1(transitive)
- Removedq@1.5.1(transitive)
Updatedappium-logger@^2.0.0
Updatedbabel-runtime@=5.8.24
Updatedbplist-creator@^0.0.6