Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appium-support

Package Overview
Dependencies
Maintainers
6
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appium-support - npm Package Compare versions

Comparing version 2.0.0-beta2 to 2.0.0-beta20

build/lib/fs.js

28

build/index.js

@@ -5,2 +5,4 @@ 'use strict';

var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
Object.defineProperty(exports, '__esModule', {

@@ -22,12 +24,20 @@ value: true

var _libFs = require('./lib/fs');
var _libFs2 = _interopRequireDefault(_libFs);
var _libRimraf = require('./lib/rimraf');
var _libRimraf2 = _interopRequireDefault(_libRimraf);
var _libPlist = require('./lib/plist');
var plist = _interopRequireWildcard(_libPlist);
var _libMkdirp = require('./lib/mkdirp');
// can't add to other exports `as default`
// until JSHint figures out how to parse that pattern
exports['default'] = {
tempDir: tempDir,
system: system,
util: util
};
exports.tempDir = tempDir;
exports.system = system;
exports.util = util;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OzBCQUV5QixlQUFlOztJQUE1QixPQUFPOzt5QkFDSyxjQUFjOztJQUExQixNQUFNOzt1QkFDSSxZQUFZOztJQUF0QixJQUFJOzs7O3FCQUlEO0FBQ2IsU0FBTyxFQUFQLE9BQU87QUFDUCxRQUFNLEVBQU4sTUFBTTtBQUNOLE1BQUksRUFBSixJQUFJO0NBQ0w7UUFFUSxPQUFPLEdBQVAsT0FBTztRQUFFLE1BQU0sR0FBTixNQUFNO1FBQUUsSUFBSSxHQUFKLElBQUkiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJcblxuaW1wb3J0ICogYXMgdGVtcERpciBmcm9tICcuL2xpYi90ZW1wZGlyJztcbmltcG9ydCAqIGFzIHN5c3RlbSBmcm9tICcuL2xpYi9zeXN0ZW0nO1xuaW1wb3J0ICogYXMgdXRpbCBmcm9tICcuL2xpYi91dGlsJztcblxuLy8gY2FuJ3QgYWRkIHRvIG90aGVyIGV4cG9ydHMgYGFzIGRlZmF1bHRgXG4vLyB1bnRpbCBKU0hpbnQgZmlndXJlcyBvdXQgaG93IHRvIHBhcnNlIHRoYXQgcGF0dGVyblxuZXhwb3J0IGRlZmF1bHQge1xuICB0ZW1wRGlyLFxuICBzeXN0ZW0sXG4gIHV0aWxcbn07XG5cbmV4cG9ydCB7IHRlbXBEaXIsIHN5c3RlbSwgdXRpbCB9O1xuIl19
exports['default'] = { tempDir: tempDir, system: system, util: util, fs: _libFs2['default'], rimraf: _libRimraf2['default'], cancellableDelay: _libUtil.cancellableDelay, plist: plist, mkdirp: _libMkdirp.mkdirp };
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7MEJBQXlCLGVBQWU7O0lBQTVCLE9BQU87O3lCQUNLLGNBQWM7O0lBQTFCLE1BQU07O3VCQUNJLFlBQVk7O0lBQXRCLElBQUk7O3FCQUVELFVBQVU7Ozs7eUJBQ04sY0FBYzs7Ozt3QkFDVixhQUFhOztJQUF4QixLQUFLOzt5QkFDTSxjQUFjOzs7O3FCQUl0QixFQUFFLE9BQU8sRUFBUCxPQUFPLEVBQUUsTUFBTSxFQUFOLE1BQU0sRUFBRSxJQUFJLEVBQUosSUFBSSxFQUFFLEVBQUUsb0JBQUEsRUFBRSxNQUFNLHdCQUFBLEVBQUUsZ0JBQWdCLDJCQUFBLEVBQUUsS0FBSyxFQUFMLEtBQUssRUFBRSxNQUFNLG1CQUFBLEVBQUUiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyB0ZW1wR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Bvcy50eXBlKCkgPT09ICdEYXJ3aW4nO1xufVxuXG5mdW5jdGlvbiBpc0xpbnV4ICgpIHtcbiAgcmV0dXJuICFpc1dpbmRvd3MoKSAmJiAhaXNNYWMoKTtcbn1cblxuZnVuY3Rpb24gaXNPU1dpbjY0KCkge1xuICByZXR1cm4gcHJvY2Vzcy5hcmNoID09PSAneDY0JyB8fCBwcm9jZXNzLmVudi5oYXNPd25Qcm9wZXJ0eSgnUFJPQ0VTU09SX0FSQ0hJVEVXNjQzMicpO1xufVxuXG5hc3luYyBmdW5jdGlvbiBhcmNoICgpIHsgXG4gIGlmIChpc0xpbnV4KCkgfHwgaXNNYWMoKSkge1xuICAgIGxldCB7c3Rkb3V0fSA9IGF3YWl0IGV4ZWMoJ3VuYW1lJywgWyctbSddKTtcbiAgICByZXR1cm4gc3Rkb3V0LnRyaW0oKSA9PT0gJ2k2ODYnID8gJzMyJyA6ICc2NCc7ICBcbiAgfSBlbHNlIGlmIChpc1dpbmRvd3MoKSkge1xuICAgIGxldCBpczY0ID0gdGhpcy5pc09TV2luNjQoKTtcbiAgICByZXR1cm4gaXM2NCA/ICc2NCcgOiAnMzInOyBcbiAgfVxufVxuXG5leHBvcnQgeyBpc1dpbmRvd3MsIGlzTWFjLCBpc0xpbnV4LCBpc09TV2luNjQsIGFyY2ggfTsiXX0=

@@ -32,8 +32,8 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */

var _appiumLogger = require('appium-logger');
var _logger = require('./logger');
var _logger2 = _interopRequireDefault(_logger);
var _util = require('./util');
var logger = (0, _appiumLogger.getLogger)('Appium-Support');
var fs = {

@@ -115,3 +115,3 @@ open: _bluebird2['default'].promisify(_fs3['default'].open),

logger.errorAndThrow(context$1$0.t0);
_logger2['default'].errorAndThrow(context$1$0.t0);

@@ -168,2 +168,2 @@ case 13:

// opens the file in mode 384
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi90ZW1wZGlyLmpz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MgKHJhd0FmZml4ZXMsIGRlZmF1bHRQcmVmaXgpIHtcbiAgbGV0IGFmZml4ZXMgPSB7cHJlZml4OiBudWxsLCBzdWZmaXg6IG51bGx9O1xuICBpZiAocmF3QWZmaXhlcykge1xuICAgIHN3aXRjaCAodHlwZW9mKHJhd0FmZml4ZXMpKSB7XG4gICAgICBjYXNlICdzdHJpbmcnOlxuICAgICAgICBhZmZpeGVzLnByZWZpeCA9IHJhd0FmZml4ZXM7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgICAgYWZmaXhlcyA9IHJhd0FmZml4ZXM7XG4gICAgICAgIGJyZWFrO1xuICAgICAgZGVmYXVsdDpcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmtub3duIGFmZml4IGRlY2xhcmF0aW9uOiAke2FmZml4ZXN9YCk7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGFmZml4ZXMucHJlZml4ID0gZGVmYXVsdFByZWZpeDtcbiAgfVxuICByZXR1cm4gYWZmaXhlcztcbn1cblxuY29uc3QgX3N0YXRpYyA9IHRlbXBEaXIoKTtcbmNvbnN0IG9wZW5EaXIgPSB0ZW1wRGlyO1xuXG5hc3luYyBmdW5jdGlvbiBzdGF0aWNEaXIgKCkge1xuICByZXR1cm4gX3N0YXRpYztcbn1cblxuZXhwb3J0IHsgb3BlbiwgcGF0aCwgb3BlbkRpciwgc3RhdGljRGlyIH07XG4iXX0=

@@ -12,2 +12,6 @@ 'use strict';

var _bluebird = require('bluebird');
var _bluebird2 = _interopRequireDefault(_bluebird);
var _lodash = require('lodash');

@@ -17,6 +21,2 @@

var _fs2 = require('fs');
var _fs3 = _interopRequireDefault(_fs2);
var _os = require('os');

@@ -26,17 +26,12 @@

var _bluebird = require('bluebird');
var _fs = require('./fs');
var _bluebird2 = _interopRequireDefault(_bluebird);
var _fs2 = _interopRequireDefault(_fs);
var _appiumLogger = require('appium-logger');
var _path = require('path');
var logger = (0, _appiumLogger.getLogger)('Appium-Support');
var _path2 = _interopRequireDefault(_path);
var fs = {
mkdir: _bluebird2['default'].promisify(_fs3['default'].mkdir),
access: _bluebird2['default'].promisify(_fs3['default'].access)
};
function hasContent(val) {
return _lodash2['default'].isString(val) && val !== '';
return _lodash2['default'].isString(val) && val !== "";
}

@@ -68,23 +63,9 @@

case 0:
context$1$0.prev = 0;
context$1$0.next = 3;
return _regeneratorRuntime.awrap(fs.access(path, fs.F_OK | fs.R_OK));
return context$1$0.abrupt('return', _fs2['default'].hasAccess(path));
case 3:
context$1$0.next = 8;
break;
case 5:
context$1$0.prev = 5;
context$1$0.t0 = context$1$0['catch'](0);
return context$1$0.abrupt('return', false);
case 8:
return context$1$0.abrupt('return', true);
case 9:
case 1:
case 'end':
return context$1$0.stop();
}
}, null, this, [[0, 5]]);
}, null, this);
}

@@ -98,6 +79,6 @@

context$1$0.next = 3;
return _regeneratorRuntime.awrap(fs.mkdir(dirName));
return _regeneratorRuntime.awrap(_fs2['default'].mkdir(dirName));
case 3:
context$1$0.next = 8;
context$1$0.next = 9;
break;

@@ -109,7 +90,10 @@

if (context$1$0.t0 && context$1$0.t0.code !== 'EEXIST') {
logger.errorAndThrow(context$1$0.t0);
if (!(context$1$0.t0 && context$1$0.t0.code !== "EEXIST")) {
context$1$0.next = 9;
break;
}
case 8:
throw context$1$0.t0;
case 9:
case 'end':

@@ -128,2 +112,28 @@ return context$1$0.stop();

/*
* Creates a promise that is cancellable, and will timeout
* after `ms` delay
*/
function cancellableDelay(ms) {
var timer = undefined;
return new _bluebird2['default'].Promise(function (resolve) {
timer = setTimeout(function () {
resolve();
}, ms);
}).cancellable()['catch'](_bluebird2['default'].CancellationError, function (err) {
clearTimeout(timer);
throw err;
});
}
function multiResolve(roots) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return roots.map(function (root) {
return _path2['default'].resolve.apply(_path2['default'], [root].concat(args));
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VzcycpXG4gICAgLmZpcnN0KClcbiAgICAudmFsdWUoKTtcbiAgcmV0dXJuIGlwO1xufVxuXG5leHBvcnQgeyBoYXNWYWx1ZSwgZXNjYXBlU3BhY2UsIGhhc0FjY2VzcywgbWtkaXIsIGxvY2FsSXAgfTsiXX0=
exports.cancellableDelay = cancellableDelay;
exports.multiResolve = multiResolve;
// TODO: deprecate, use fs.hasAccess instead
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi91dGlsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O3dCQUFjLFVBQVU7Ozs7c0JBQ1YsUUFBUTs7OztrQkFDUCxJQUFJOzs7O2tCQUNKLE1BQU07Ozs7b0JBQ0osTUFBTTs7OztBQUVoQixTQUFTLFVBQVUsQ0FBRSxHQUFHLEVBQUU7QUFDL0IsU0FBTyxvQkFBRSxRQUFRLENBQUMsR0FBRyxDQUFDLElBQUksR0FBRyxLQUFLLEVBQUUsQ0FBQztDQUN0Qzs7O0FBR0QsU0FBUyxRQUFRLENBQUUsR0FBRyxFQUFFO0FBQ3RCLE1BQUksTUFBTSxHQUFHLEtBQUssQ0FBQzs7QUFFbkIsTUFBSSxvQkFBRSxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUU7QUFDbkIsVUFBTSxHQUFHLENBQUMsb0JBQUUsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0dBQ3hCLE1BQU07QUFDTCxVQUFNLEdBQUcsQ0FBQyxvQkFBRSxXQUFXLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxvQkFBRSxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7R0FDaEQ7O0FBRUQsU0FBTyxNQUFNLENBQUM7Q0FDZjs7O0FBR0QsU0FBUyxXQUFXLENBQUUsR0FBRyxFQUFFO0FBQ3pCLFNBQU8sR0FBRyxDQUFDLEtBQUssQ0FBQyxHQUFHLENB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ljZSgpLnJldHVybnMoJ1dpbmRvd3NfTlQnKTtcbiAgICAgIG1vY2tzLnN5c3RlbS5leHBlY3RzKCdpc09TV2luNjQnKS5vbmNlKCkucmV0dXJucyhmYWxzZSk7XG4gICAgICBsZXQgYXJjaCA9IGF3YWl0IHN5c3RlbS5hcmNoKCk7XG4gICAgICBhcmNoLnNob3VsZC5lcXVhbCgnMzInKTtcbiAgICAgIG1vY2tzW1NBTkRCT1hdLnZlcmlmeSgpO1xuICAgIH0pO1xuICB9KTtcbn0pO1xuIl19

@@ -9,6 +9,2 @@ 'use strict';

var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _chai = require('chai');

@@ -59,5 +55,6 @@

res.fd.should.exist;
_fs2['default'].existsSync(res.path).should.be.ok;
context$2$0.next = 9;
return _regeneratorRuntime.awrap(_.fs.exists(res.path).should.eventually.be.ok);
case 8:
case 9:
case 'end':

@@ -81,13 +78,18 @@ return context$2$0.stop();

res.should.be.a('string');
_fs2['default'].existsSync(res).should.be.ok;
context$2$0.next = 7;
context$2$0.next = 6;
return _regeneratorRuntime.awrap(_.fs.exists(res).should.eventually.be.ok);
case 6:
context$2$0.next = 8;
return _regeneratorRuntime.awrap(_.tempDir.openDir());
case 7:
case 8:
res2 = context$2$0.sent;
context$2$0.next = 11;
return _regeneratorRuntime.awrap(_.fs.exists(res2).should.eventually.be.ok);
_fs2['default'].existsSync(res2).should.be.ok;
case 11:
res.should.not.equal(res2);
case 10:
case 12:
case 'end':

@@ -111,13 +113,18 @@ return context$2$0.stop();

res.should.be.a('string');
_fs2['default'].existsSync(res).should.be.ok;
context$2$0.next = 7;
context$2$0.next = 6;
return _regeneratorRuntime.awrap(_.fs.exists(res).should.eventually.be.ok);
case 6:
context$2$0.next = 8;
return _regeneratorRuntime.awrap(_.tempDir.staticDir());
case 7:
case 8:
res2 = context$2$0.sent;
context$2$0.next = 11;
return _regeneratorRuntime.awrap(_.fs.exists(res2).should.eventually.be.ok);
_fs2['default'].existsSync(res2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uICB9KTtcblxuICBpdCgnc2hvdWxkIGdlbmVyYXRlIGEgcmFuZG9tIHRlbXAgZGlyJywgYXN5bmMgKCkgPT4ge1xuICAgIGxldCByZXMgPSBhd2FpdCB0ZW1wRGlyLm9wZW5EaXIoKTtcbiAgICByZXMuc2hvdWxkLmJlLmEoJ3N0cmluZycpO1xuICAgIGF3YWl0IGZzLmV4aXN0cyhyZXMpLnNob3VsZC5ldmVudHVhbGx5LmJlLm9rO1xuICAgIGxldCByZXMyID0gYXdhaXQgdGVtcERpci5vcGVuRGlyKCk7XG4gICAgYXdhaXQgZnMuZXhpc3RzKHJlczIpLnNob3VsZC5ldmVudHVhbGx5LmJlLm9rO1xuICAgIHJlcy5zaG91bGQubm90LmVxdWFsKHJlczIpO1xuICB9KTtcblxuICBpdCgnc2hvdWxkIGdlbmVyYXRlIG9uZSB0ZW1wIGRpciB1c2VkIGZvciB0aGUgbGlmZSBvZiB0aGUgcHJvY2VzcycsIGFzeW5jICgpID0+IHtcbiAgICBsZXQgcmVzID0gYXdhaXQgdGVtcERpci5zdGF0aWNEaXIoKTtcbiAgICByZXMuc2hvdWxkLmJlLmEoJ3N0cmluZycpO1xuICAgIGF3YWl0IGZzLmV4aXN0cyhyZXMpLnNob3VsZC5ldmVudHVhbGx5LmJlLm9rO1xuICAgIGxldCByZXMyID0gYXdhaXQgdGVtcERpci5zdGF0aWNEaXIoKTtcbiAgICBhd2FpdCBmcy5leGlzdHMocmVzMikuc2hvdWxkLmV2ZW50dWFsbHkuYmUub2s7XG4gICAgcmVzLnNob3VsZC5lcXVhbChyZXMyKTtcbiAgfSk7XG59KTtcblxuIl19

@@ -21,2 +21,6 @@ 'use strict';

var _chaiAsPromised = require('chai-as-promised');
var _chaiAsPromised2 = _interopRequireDefault(_chaiAsPromised);
var _bluebird = require('bluebird');

@@ -32,7 +36,8 @@

var should = _chai2['default'].should();
_chai2['default'].use(_chaiAsPromised2['default']);
describe('util', function () {
describe('hasValue ', function () {
it('should exist', function () {
describe("hasValue ", function () {
it("should exist", function () {
should.exist(_.util.hasValue);

@@ -78,3 +83,3 @@ });

describe('hasContent ', function () {
describe("hasContent ", function () {
it('should exist', function () {

@@ -121,4 +126,4 @@ should.exist(_.util.hasContent);

describe('escapeSpace', function () {
it('should do nothing to a string without space', function () {
describe("escapeSpace", function () {
it("should do nothing to a string without space", function () {
var actual = 'appium';

@@ -129,3 +134,3 @@ var expected = 'appium';

it('should do escape spaces', function () {
it("should do escape spaces", function () {
var actual = '/Applications/ Xcode 6.1.1.app/Contents/Developer';

@@ -136,3 +141,3 @@ var expected = '/Applications/\\ Xcode\\ 6.1.1.app/Contents/Developer';

it('should escape consecutive spaces', function () {
it("should escape consecutive spaces", function () {
var actual = 'appium space';

@@ -144,4 +149,4 @@ var expected = 'appium\\ \\ \\ space';

describe('fileExists', function () {
it('should return true if file is readable', function callee$2$0() {
describe("fileExists", function () {
it("should return true if file is readable", function callee$2$0() {
var exists;

@@ -166,3 +171,3 @@ return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {

it('should return false if file does not exist', function callee$2$0() {
it("should return false if file does not exist", function callee$2$0() {
var exists;

@@ -188,4 +193,4 @@ return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {

describe('localIp', function () {
it('should find a local ip address', function () {
describe("localIp", function () {
it("should find a local ip address", function () {
var utilMock = _sinon2['default'].mock(_.util);

@@ -198,6 +203,6 @@ utilMock.expects('localIp').returns('10.35.4.175');

describe('mkdir', function () {
var dirName = _path2['default'].resolve(__dirname, 'tmp');
describe("mkdir", function () {
var dirName = _path2['default'].resolve(__dirname, "tmp");
it('should make a directory that doesn\'t exist', function callee$2$0() {
it("should make a directory that doesn't exist", function callee$2$0() {
var exists;

@@ -230,3 +235,3 @@ return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {

it('should not complain if the dir already exists', function callee$2$0() {
it("should not complain if the dir already exists", function callee$2$0() {
var exists;

@@ -253,3 +258,3 @@ return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {

it('should still throw an error if something else goes wrong', function callee$2$0() {
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) {

@@ -259,3 +264,3 @@ while (1) switch (context$3$0.prev = context$3$0.next) {

context$3$0.next = 2;
return _regeneratorRuntime.awrap(_.util.mkdir('/bin/foo').should.be.rejected);
return _regeneratorRuntime.awrap(_.util.mkdir("/bin/foo").should.be.rejected);

@@ -269,3 +274,38 @@ case 2:

});
describe("cancellableDelay", function () {
it("should delay", 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.cancellableDelay('10'));
case 2:
case 'end':
return context$3$0.stop();
}
}, null, this);
});
it("cancel should work", function callee$2$0() {
var delay;
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {
while (1) switch (context$3$0.prev = context$3$0.next) {
case 0:
delay = _.util.cancellableDelay('1000');
_bluebird2['default'].delay(10).then(function () {
delay.cancel();
}).done();
context$3$0.next = 4;
return _regeneratorRuntime.awrap(delay.should.be.rejectedWith(/cancellation error/));
case 4:
case 'end':
return context$3$0.stop();
}
}, null, this);
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvdXRpbC1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLENBQUM7Ozs7OztnQkFFUSxPQUFPOzt1QkFDUixRQUFROzs7O29CQUNYLE1BQU07Ozs7b0JBQ04sTUFBTTs7Ozt3QkFDVCxVQUFVOzs7O3FCQUNOLE9BQU87Ozs7QUFFekIsSUFBSSxNQUFNLEdBQUcsc0JBQUUsU0FBUyxxQkFBUyxDQUFDO0FBQ2xDLElBQUksTUFBTSxHQUFHLGtCQUFLLE1BQU0sRUFBRSxDQUFDOztBQUczQixRQUFRLENBQUMsTUFBTSxFQ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0aW9uIGVycm9yLyk7XG4gICAgfSk7XG4gIH0pO1xufSk7XG5cbiJdfQ==

@@ -1,15 +0,12 @@

import * as tempDir from './lib/tempdir';
import * as system from './lib/system';
import * as util from './lib/util';
import { cancellableDelay } from './lib/util';
import fs from './lib/fs';
import rimraf from './lib/rimraf';
import * as plist from './lib/plist';
import { mkdirp } from './lib/mkdirp';
// can't add to other exports `as default`
// until JSHint figures out how to parse that pattern
export default {
tempDir,
system,
util
};
export { tempDir, system, util };
export default { tempDir, system, util, fs, rimraf, cancellableDelay, plist, mkdirp };

@@ -7,5 +7,5 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */

import B from 'bluebird';
import { getLogger } from 'appium-logger';
import log from './logger';
const logger = getLogger('Appium-Support');
import { hasAccess } from './util';

@@ -51,3 +51,3 @@ let fs = {

} catch (err) {
logger.errorAndThrow(err);
log.errorAndThrow(err);
}

@@ -54,0 +54,0 @@

@@ -1,16 +0,7 @@

import B from 'bluebird';
import _ from 'lodash';
import _fs from 'fs';
import os from 'os';
import B from 'bluebird';
import { getLogger } from 'appium-logger';
import fs from './fs';
import path from 'path';
let logger = getLogger('Appium-Support');
let fs = {
mkdir: B.promisify(_fs.mkdir),
access: B.promisify(_fs.access)
};
export function hasContent (val) {

@@ -41,17 +32,13 @@ return _.isString(val) && val !== "";

async function hasAccess (path) {
try {
await fs.access(path, fs.F_OK | fs.R_OK);
} catch (err) {
return false;
}
return true;
// TODO: deprecate, use fs.hasAccess instead
return fs.hasAccess(path);
}
async function mkdir (dirName) {
try {
try {
await fs.mkdir(dirName);
} catch (err) {
if (err && err.code !== "EEXIST") {
logger.errorAndThrow(err);
}
throw err;
}
}

@@ -73,2 +60,26 @@ }

export { hasValue, escapeSpace, hasAccess, mkdir, localIp };
/*
* Creates a promise that is cancellable, and will timeout
* after `ms` delay
*/
function cancellableDelay (ms) {
let timer;
return new B.Promise((resolve) => {
timer = setTimeout(function() {
resolve();
}, ms);
})
.cancellable()
.catch(B.CancellationError, (err) => {
clearTimeout(timer);
throw err;
});
}
function multiResolve (roots, ...args) {
return roots.map((root) => {
return path.resolve(root, ...args);
});
}
export { hasValue, escapeSpace, hasAccess, mkdir, localIp, cancellableDelay, multiResolve };

@@ -7,3 +7,3 @@ {

],
"version": "2.0.0-beta2",
"version": "2.0.0-beta20",
"author": "appium",

@@ -27,6 +27,13 @@ "license": "Apache-2.0",

"dependencies": {
"MD5": "^1.3.0",
"appium-logger": "^1.0.0",
"babel-runtime": "=5.6.16",
"bluebird": "^2.9.25",
"bplist-creator": "0.0.6",
"bplist-parser": "^0.1.0",
"lodash": "^3.10.0",
"mkdirp": "^0.5.1",
"ncp": "^2.0.0",
"plist": "^1.1.0",
"rimraf": "^2.4.1",
"source-map-support": "^0.3.1",

@@ -41,9 +48,8 @@ "teen_process": "^1.0.0"

"devDependencies": {
"appium-gulp-plugins": "^1.2.12",
"appium-gulp-plugins": "^1.3.0",
"chai": "^3.0.0",
"chai-as-promised": "^5.1.0",
"gulp": "^3.8.11",
"rimraf": "^2.4.1",
"sinon": "^1.0.0"
}
}

@@ -1,5 +0,3 @@

"use strict";
import { tempDir } from '../..';
import fs from 'fs';
import { tempDir, fs } from '../..';
import chai from 'chai';

@@ -22,3 +20,3 @@

res.fd.should.exist;
fs.existsSync(res.path).should.be.ok;
await fs.exists(res.path).should.eventually.be.ok;
});

@@ -29,5 +27,5 @@

res.should.be.a('string');
fs.existsSync(res).should.be.ok;
await fs.exists(res).should.eventually.be.ok;
let res2 = await tempDir.openDir();
fs.existsSync(res2).should.be.ok;
await fs.exists(res2).should.eventually.be.ok;
res.should.not.equal(res2);

@@ -39,5 +37,5 @@ });

res.should.be.a('string');
fs.existsSync(res).should.be.ok;
await fs.exists(res).should.eventually.be.ok;
let res2 = await tempDir.staticDir();
fs.existsSync(res2).should.be.ok;
await fs.exists(res2).should.eventually.be.ok;
res.should.equal(res2);

@@ -44,0 +42,0 @@ });

@@ -1,2 +0,1 @@

"use strict";

@@ -7,2 +6,3 @@ import { util } from '../..';

import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import B from 'bluebird';

@@ -13,4 +13,4 @@ import sinon from 'sinon';

let should = chai.should();
chai.use(chaiAsPromised);
describe('util', function () {

@@ -164,3 +164,14 @@

});
describe("cancellableDelay", function () {
it("should delay", async function () {
await util.cancellableDelay('10');
});
it("cancel should work", async function () {
let delay = util.cancellableDelay('1000');
B.delay(10).then(function() { delay.cancel(); }).done();
await delay.should.be.rejectedWith(/cancellation error/);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc