appium-support
Advanced tools
Comparing version 2.0.0-beta1 to 2.0.0-beta2
'use strict'; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
@@ -11,15 +11,22 @@ Object.defineProperty(exports, '__esModule', { | ||
var _libTempdir2 = _interopRequireDefault(_libTempdir); | ||
var tempDir = _interopRequireWildcard(_libTempdir); | ||
var _libSystem = require('./lib/system'); | ||
var _libSystem2 = _interopRequireDefault(_libSystem); | ||
var system = _interopRequireWildcard(_libSystem); | ||
var _libUtil = require('./lib/util'); | ||
var _libUtil2 = _interopRequireDefault(_libUtil); | ||
var util = _interopRequireWildcard(_libUtil); | ||
exports.tempDir = _libTempdir2['default']; | ||
exports.system = _libSystem2['default']; | ||
exports.util = _libUtil2['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OzBCQUVvQixlQUFlOzs7O3lCQUNoQixjQUFjOzs7O3VCQUNoQixZQUFZOzs7O1FBR3BCLE9BQU87UUFBRSxNQUFNO1FBQUUsSUFBSSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIlxuXG5pbXBvcnQgdGVtcERpciBmcm9tICcuL2xpYi90ZW1wZGlyJztcbmltcG9ydCBzeXN0ZW0gZnJvbSAnLi9saWIvc3lzdGVtJztcbmltcG9ydCB1dGlsIGZyb20gJy4vbGliL3V0aWwnO1xuXG5cbmV4cG9ydCB7IHRlbXBEaXIsIHN5c3RlbSwgdXRpbCB9OyJdfQ== | ||
// 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 |
@@ -92,3 +92,3 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
var open = function open(affixes) { | ||
function open(affixes) { | ||
var filePath, fd; | ||
@@ -122,3 +122,3 @@ return _regeneratorRuntime.async(function open$(context$1$0) { | ||
}, null, this, [[3, 10]]); | ||
}; | ||
} | ||
@@ -144,4 +144,22 @@ function parseAffixes(rawAffixes, defaultPrefix) { | ||
var _static = tempDir(); | ||
var openDir = tempDir; | ||
function staticDir() { | ||
return _regeneratorRuntime.async(function staticDir$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
return context$1$0.abrupt('return', _static); | ||
case 1: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
exports.open = open; | ||
exports.path = path; | ||
exports.openDir = openDir; | ||
exports.staticDir = staticDir; | ||
@@ -151,2 +169,2 @@ // creates a temp directory using the date and a random string | ||
// opens the file in mode 384 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi90ZW1wZGlyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O21CQUNnQixJQUFJOzs7O2tCQUNMLElBQUk7Ozs7b0JBQ0UsTUFBTTs7Ozt5QkFDVixXQUFXOzs7O3dCQUNkLFVBQVU7Ozs7NEJBQ0UsZUFBZTs7b0JBR2YsUUFBUTs7QUFEbEMsSUFBTSxNQUFNLEdBQUcsa0JBRk4sU0FBUyxFQUVPLGdCQUFnQixDQUFDLENBQUM7O0FBRTNDLElBQUksRUFBRSxHQUFHO0FBQ1AsTUFBSSxFQUFFLHNCQUFFLFNBQVMsQ0FBQyxnQkFBSSxJQUFJLENBQUM7QUFDM0IsT0FBSyxFQUFFLHNCQUFFLFNBQVMsQ0FBQyxnQkFBSSxLQUFLLENBQUM7Q0FDOUIsQ0FBQzs7QUFFRixJQUFNLFNBQVMsR0FBRyx1QkFBSyxPQUFPLEdBQUcsdUJBQUssT0FBTyxHQUFHLHVCQUFLLE1BQU0sR0FBRyx1QkFBSyxNQUFNLENBQUM7O0FBRTFFLFNBQWUsT0FBTztNQUNoQixHQUFHLEVBQ0gsUUFBUSxFQVFSLE1BQU07Ozs7QUFUTixXQUFHLEdBQUcsSUFBSSxJQUFJLEVBQUU7QUFDaEIsZ0JBQVEsR0FBRyxrQkFBUyx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= require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
var _libSystem = require('../lib/system'); | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
var system = _interopRequireWildcard(_libSystem); | ||
var _2 = require('../..'); | ||
@@ -45,3 +43,3 @@ var _chai = require('chai'); | ||
var mocks = {}; | ||
var libs = { teen_process: teen_process, os: _os2['default'], system: system }; | ||
var libs = { teen_process: teen_process, os: _os2['default'], system: _2.system }; | ||
@@ -53,3 +51,3 @@ describe('system', function () { | ||
osMock.expects('type').returns('Windows_NT'); | ||
system.isWindows().should.equal['true']; | ||
_2.system.isWindows().should.equal['true']; | ||
osMock.verify(); | ||
@@ -62,3 +60,3 @@ osMock.restore(); | ||
osMock.expects('type').returns('Darwin'); | ||
system.isMac().should.equal['true']; | ||
_2.system.isMac().should.equal['true']; | ||
osMock.verify(); | ||
@@ -71,3 +69,3 @@ osMock.restore(); | ||
osMock.expects('type').twice().returns('Linux'); | ||
system.isLinux().should.equal['true']; | ||
_2.system.isLinux().should.equal['true']; | ||
osMock.verify(); | ||
@@ -123,3 +121,3 @@ osMock.restore(); | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(system.arch()); | ||
return _regeneratorRuntime.awrap(_2.system.arch()); | ||
@@ -147,3 +145,3 @@ case 4: | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(system.arch()); | ||
return _regeneratorRuntime.awrap(_2.system.arch()); | ||
@@ -171,3 +169,3 @@ case 4: | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(system.arch()); | ||
return _regeneratorRuntime.awrap(_2.system.arch()); | ||
@@ -195,3 +193,3 @@ case 4: | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(system.arch()); | ||
return _regeneratorRuntime.awrap(_2.system.arch()); | ||
@@ -212,2 +210,2 @@ case 4: | ||
}); | ||
//# sourceMappingURL=data:application/json;base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gICAgIG1vY2tzLnN5c3RlbS5leHBlY3RzKCdpc09TV2luNjQnKS5vbmNlKCkucmV0dXJucyhmYWxzZSk7XG4gICAgICBsZXQgYXJjaCA9IGF3YWl0IHN5c3RlbS5hcmNoKCk7XG4gICAgICBhcmNoLnNob3VsZC5lcXVhbCgnMzInKTtcbiAgICAgIG1vY2tzW1NBTkRCT1hdLnZlcmlmeSgpO1xuICAgIH0pO1xuICB9KTtcbn0pO1xuIl19 |
@@ -5,10 +5,6 @@ 'use strict'; | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
var _libTempdir = require('../lib/tempdir'); | ||
var _ = require('../..'); | ||
var tempDir = _interopRequireWildcard(_libTempdir); | ||
var _fs = require('fs'); | ||
@@ -25,2 +21,4 @@ | ||
describe('tempdir', function () { | ||
var _this = this; | ||
it('should be able to generate a path', function callee$1$0() { | ||
@@ -32,3 +30,3 @@ var path; | ||
context$2$0.next = 2; | ||
return _regeneratorRuntime.awrap(tempDir.path({ prefix: 'myfile', suffix: '.tmp' })); | ||
return _regeneratorRuntime.awrap(_.tempDir.path({ prefix: 'myfile', suffix: '.tmp' })); | ||
@@ -45,3 +43,3 @@ case 2: | ||
} | ||
}, null, this); | ||
}, null, _this); | ||
}); | ||
@@ -55,3 +53,3 @@ | ||
context$2$0.next = 2; | ||
return _regeneratorRuntime.awrap(tempDir.open({ prefix: 'my-test-file', suffix: '.zip' })); | ||
return _regeneratorRuntime.awrap(_.tempDir.open({ prefix: 'my-test-file', suffix: '.zip' })); | ||
@@ -71,5 +69,63 @@ case 2: | ||
} | ||
}, null, this); | ||
}, null, _this); | ||
}); | ||
it('should generate a random temp dir', function callee$1$0() { | ||
var res, res2; | ||
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 _regeneratorRuntime.awrap(_.tempDir.openDir()); | ||
case 2: | ||
res = context$2$0.sent; | ||
res.should.be.a('string'); | ||
_fs2['default'].existsSync(res).should.be.ok; | ||
context$2$0.next = 7; | ||
return _regeneratorRuntime.awrap(_.tempDir.openDir()); | ||
case 7: | ||
res2 = context$2$0.sent; | ||
_fs2['default'].existsSync(res2).should.be.ok; | ||
res.should.not.equal(res2); | ||
case 10: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this); | ||
}); | ||
it('should generate one temp dir used for the life of the process', function callee$1$0() { | ||
var res, res2; | ||
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 _regeneratorRuntime.awrap(_.tempDir.staticDir()); | ||
case 2: | ||
res = context$2$0.sent; | ||
res.should.be.a('string'); | ||
_fs2['default'].existsSync(res).should.be.ok; | ||
context$2$0.next = 7; | ||
return _regeneratorRuntime.awrap(_.tempDir.staticDir()); | ||
case 7: | ||
res2 = context$2$0.sent; | ||
_fs2['default'].existsSync(res2).should.be.ok; | ||
res.should.equal(res2); | ||
case 10: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvdGVtcGRpci1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLENBQUM7Ozs7Ozs7OzBCQUVZLGdCQUFnQjs7SUFBN0IsT0FBTzs7a0JBQ0osSUFBSTs7OztvQkFDRixNQUFNOzs7O0FBRXZCLGtCQUFLLE1BQU0sRUFBRSxDQUFDOztBQUVkLFFBQVEsQ0FBQyxTQUFTLEVBQUUsWUFBWTtBQUM5QixJQUFFLENBQUMsbUNBQW1DLEVBQUU7UUFDbEMsSUFBSTs7Ozs7MkNBQVMsT0FBTyxDQUFDLElBQUks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ub3BlbkRpcigpO1xuICAgIHJlcy5zaG91bGQuYmUuYSgnc3RyaW5nJyk7XG4gICAgZnMuZXhpc3RzU3luYyhyZXMpLnNob3VsZC5iZS5vaztcbiAgICBsZXQgcmVzMiA9IGF3YWl0IHRlbXBEaXIub3BlbkRpcigpO1xuICAgIGZzLmV4aXN0c1N5bmMocmVzMikuc2hvdWxkLmJlLm9rO1xuICAgIHJlcy5zaG91bGQubm90LmVxdWFsKHJlczIpO1xuICB9KTtcblxuICBpdCgnc2hvdWxkIGdlbmVyYXRlIG9uZSB0ZW1wIGRpciB1c2VkIGZvciB0aGUgbGlmZSBvZiB0aGUgcHJvY2VzcycsIGFzeW5jICgpID0+IHtcbiAgICBsZXQgcmVzID0gYXdhaXQgdGVtcERpci5zdGF0aWNEaXIoKTtcbiAgICByZXMuc2hvdWxkLmJlLmEoJ3N0cmluZycpO1xuICAgIGZzLmV4aXN0c1N5bmMocmVzKS5zaG91bGQuYmUub2s7XG4gICAgbGV0IHJlczIgPSBhd2FpdCB0ZW1wRGlyLnN0YXRpY0RpcigpO1xuICAgIGZzLmV4aXN0c1N5bmMocmVzMikuc2hvdWxkLmJlLm9rO1xuICAgIHJlcy5zaG91bGQuZXF1YWwocmVzMik7XG4gIH0pO1xufSk7XG5cbiJdfQ== |
@@ -5,10 +5,6 @@ 'use strict'; | ||
var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
var _libUtil = require('../lib/util'); | ||
var _ = require('../..'); | ||
var util = _interopRequireWildcard(_libUtil); | ||
var _rimraf2 = require('rimraf'); | ||
@@ -41,39 +37,39 @@ | ||
it('should exist', function () { | ||
should.exist(util.hasValue); | ||
should.exist(_.util.hasValue); | ||
}); | ||
it('should handle undefined', function () { | ||
util.hasValue(undefined).should.be['false']; | ||
_.util.hasValue(undefined).should.be['false']; | ||
}); | ||
it('should handle not a number', function () { | ||
util.hasValue(NaN).should.be['false']; | ||
_.util.hasValue(NaN).should.be['false']; | ||
}); | ||
it('should handle null', function () { | ||
util.hasValue(null).should.be['false']; | ||
_.util.hasValue(null).should.be['false']; | ||
}); | ||
it('should handle functions', function () { | ||
util.hasValue(function () {}).should.be['true']; | ||
_.util.hasValue(function () {}).should.be['true']; | ||
}); | ||
it('should handle empty arrays', function () { | ||
util.hasValue({}).should.be['true']; | ||
_.util.hasValue({}).should.be['true']; | ||
}); | ||
it('should handle zero', function () { | ||
util.hasValue(0).should.be['true']; | ||
_.util.hasValue(0).should.be['true']; | ||
}); | ||
it('should handle simple string', function () { | ||
util.hasValue('string').should.be['true']; | ||
_.util.hasValue('string').should.be['true']; | ||
}); | ||
it('should handle booleans', function () { | ||
util.hasValue(false).should.be['true']; | ||
_.util.hasValue(false).should.be['true']; | ||
}); | ||
it('should handle empty strings', function () { | ||
util.hasValue('').should.be['true']; | ||
_.util.hasValue('').should.be['true']; | ||
}); | ||
@@ -84,39 +80,39 @@ }); | ||
it('should exist', function () { | ||
should.exist(util.hasContent); | ||
should.exist(_.util.hasContent); | ||
}); | ||
it('should handle undefined', function () { | ||
util.hasContent(undefined).should.be['false']; | ||
_.util.hasContent(undefined).should.be['false']; | ||
}); | ||
it('should handle not a number', function () { | ||
util.hasContent(NaN).should.be['false']; | ||
_.util.hasContent(NaN).should.be['false']; | ||
}); | ||
it('should handle null', function () { | ||
util.hasContent(null).should.be['false']; | ||
_.util.hasContent(null).should.be['false']; | ||
}); | ||
it('should handle functions', function () { | ||
util.hasContent(function () {}).should.be['false']; | ||
_.util.hasContent(function () {}).should.be['false']; | ||
}); | ||
it('should handle empty arrays', function () { | ||
util.hasContent({}).should.be['false']; | ||
_.util.hasContent({}).should.be['false']; | ||
}); | ||
it('should handle zero', function () { | ||
util.hasContent(0).should.be['false']; | ||
_.util.hasContent(0).should.be['false']; | ||
}); | ||
it('should handle simple string', function () { | ||
util.hasContent('string').should.be['true']; | ||
_.util.hasContent('string').should.be['true']; | ||
}); | ||
it('should handle booleans', function () { | ||
util.hasContent(false).should.be['false']; | ||
_.util.hasContent(false).should.be['false']; | ||
}); | ||
it('should handle empty strings', function () { | ||
util.hasContent('').should.be['false']; | ||
_.util.hasContent('').should.be['false']; | ||
}); | ||
@@ -129,3 +125,3 @@ }); | ||
var expected = 'appium'; | ||
util.escapeSpace(actual).should.equal(expected); | ||
_.util.escapeSpace(actual).should.equal(expected); | ||
}); | ||
@@ -136,3 +132,3 @@ | ||
var expected = '/Applications/\\ Xcode\\ 6.1.1.app/Contents/Developer'; | ||
util.escapeSpace(actual).should.equal(expected); | ||
_.util.escapeSpace(actual).should.equal(expected); | ||
}); | ||
@@ -143,3 +139,3 @@ | ||
var expected = 'appium\\ \\ \\ space'; | ||
util.escapeSpace(actual).should.equal(expected); | ||
_.util.escapeSpace(actual).should.equal(expected); | ||
}); | ||
@@ -155,3 +151,3 @@ }); | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(util.hasAccess('/')); | ||
return _regeneratorRuntime.awrap(_.util.hasAccess('/')); | ||
@@ -176,3 +172,3 @@ case 2: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(util.hasAccess('chuckwudi')); | ||
return _regeneratorRuntime.awrap(_.util.hasAccess('chuckwudi')); | ||
@@ -194,5 +190,5 @@ case 2: | ||
it('should find a local ip address', function () { | ||
var utilMock = _sinon2['default'].mock(util); | ||
var utilMock = _sinon2['default'].mock(_.util); | ||
utilMock.expects('localIp').returns('10.35.4.175'); | ||
util.localIp(); | ||
_.util.localIp(); | ||
utilMock.verify(); | ||
@@ -215,7 +211,7 @@ }); | ||
context$3$0.next = 4; | ||
return _regeneratorRuntime.awrap(util.mkdir(dirName)); | ||
return _regeneratorRuntime.awrap(_.util.mkdir(dirName)); | ||
case 4: | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(util.hasAccess(dirName)); | ||
return _regeneratorRuntime.awrap(_.util.hasAccess(dirName)); | ||
@@ -240,3 +236,3 @@ case 6: | ||
context$3$0.next = 2; | ||
return _regeneratorRuntime.awrap(util.hasAccess(dirName)); | ||
return _regeneratorRuntime.awrap(_.util.hasAccess(dirName)); | ||
@@ -248,3 +244,3 @@ case 2: | ||
context$3$0.next = 6; | ||
return _regeneratorRuntime.awrap(util.mkdir(dirName)); | ||
return _regeneratorRuntime.awrap(_.util.mkdir(dirName)); | ||
@@ -263,3 +259,3 @@ case 6: | ||
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); | ||
@@ -274,2 +270,2 @@ case 2: | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvdXRpbC1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLENBQUM7Ozs7Ozs7O3VCQUVTLGFBQWE7O0lBQXZCLElBQUk7O3VCQUNJLFFBQVE7Ozs7b0JBQ1gsTUFBTTs7OztvQkFDTixNQUFNOzs7O3dCQUNULFVBQVU7Ozs7cUJBQ04sT0FBTzs7OztBQUV6QixJQUFJLE1BQU0sR0FBRyxzQkFBRSxTQUFTLHFCQUFTLENBQUM7QUFDbEMsSUFBSSxNQUFNLEdBQUcsa0JBQUssTUFBTSxFQUFFLENBQUM7O0FBRzNCLFFBQVEsQ0FBQyxNQUFNLEVBQUUsWUFBWTs7QUFFM0IsVUFBUSxDQUFDLFdBQVcsRUFBRSxZQUFZO0FBQ2hDLE1BQUUsQ0FBQyxjQUFjLEVBQUUsWUFBWTtBQUM3QixZQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQztLQUM3QixDQUFDLENBQUM7O0FBRUgsTUFBRSxDQUFDLHlCQUF5QixFQUFFLFlBQVk7QUFDeEMsVUFBSSxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsQ0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gIH0pO1xuICB9KTtcblxuICBkZXNjcmliZShcIm1rZGlyXCIsIGZ1bmN0aW9uICgpIHtcbiAgICBsZXQgZGlyTmFtZSA9IHBhdGgucmVzb2x2ZShfX2Rpcm5hbWUsIFwidG1wXCIpO1xuXG4gICAgaXQoXCJzaG91bGQgbWFrZSBhIGRpcmVjdG9yeSB0aGF0IGRvZXNuJ3QgZXhpc3RcIiwgYXN5bmMgZnVuY3Rpb24gKCkge1xuICAgICAgYXdhaXQgcmltcmFmKGRpck5hbWUpO1xuICAgICAgYXdhaXQgdXRpbC5ta2RpcihkaXJOYW1lKTtcbiAgICAgIGxldCBleGlzdHMgPSBhd2FpdCB1dGlsLmhhc0FjY2VzcyhkaXJOYW1lKTtcbiAgICAgIGV4aXN0cy5zaG91bGQuYmUudHJ1ZTtcbiAgICB9KTtcblxuICAgIGl0KFwic2hvdWxkIG5vdCBjb21wbGFpbiBpZiB0aGUgZGlyIGFscmVhZHkgZXhpc3RzXCIsIGFzeW5jIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgbGV0IGV4aXN0cyA9IGF3YWl0IHV0aWwuaGFzQWNjZXNzKGRpck5hbWUpO1xuICAgICAgICBleGlzdHMuc2hvdWxkLmJlLnRydWU7XG4gICAgICAgIGF3YWl0IHV0aWwubWtkaXIoZGlyTmFtZSk7XG4gICAgfSk7XG5cbiAgICBpdChcInNob3VsZCBzdGlsbCB0aHJvdyBhbiBlcnJvciBpZiBzb21ldGhpbmcgZWxzZSBnb2VzIHdyb25nXCIsIGFzeW5jIGZ1bmN0aW9uICgpIHtcbiAgICAgIGF3YWl0IHV0aWwubWtkaXIoXCIvYmluL2Zvb1wiKS5zaG91bGQuYmUucmVqZWN0ZWQ7XG4gICAgfSk7XG4gIH0pO1xufSk7XG5cbiJdfQ== |
15
index.js
import tempDir from './lib/tempdir'; | ||
import system from './lib/system'; | ||
import util from './lib/util'; | ||
import * as tempDir from './lib/tempdir'; | ||
import * as system from './lib/system'; | ||
import * as util from './lib/util'; | ||
// 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 { tempDir, system, util }; |
@@ -26,4 +26,4 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
(Math.random() * 0x100000000 + 1).toString(36)].join('')); | ||
// creates a temp directory using the date and a random string | ||
// creates a temp directory using the date and a random string | ||
let exists = await hasAccess(filePath); | ||
@@ -44,4 +44,4 @@ // testing its accessibility to determine if the file exists already | ||
let open = async function (affixes) { | ||
let filePath = await path(affixes, 'f-'); | ||
async function open (affixes) { | ||
let filePath = await path(affixes, 'f-'); | ||
try { | ||
@@ -51,7 +51,7 @@ let fd = await fs.open(filePath, RDWR_EXCL, 0o600); | ||
return {path: filePath, fd}; | ||
} catch (err) { | ||
} catch (err) { | ||
logger.errorAndThrow(err); | ||
} | ||
}; | ||
} | ||
@@ -77,2 +77,9 @@ function parseAffixes (rawAffixes, defaultPrefix) { | ||
export { open, path }; | ||
const _static = tempDir(); | ||
const openDir = tempDir; | ||
async function staticDir () { | ||
return _static; | ||
} | ||
export { open, path, openDir, staticDir }; |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "2.0.0-beta1", | ||
"version": "2.0.0-beta2", | ||
"author": "appium", | ||
@@ -10,0 +10,0 @@ "license": "Apache-2.0", |
import * as system from '../lib/system'; | ||
import { system } from '../..'; | ||
import chai from 'chai'; | ||
@@ -18,3 +18,3 @@ import os from 'os'; | ||
describe('isX functions', function () { | ||
it('should correctly return Windows System if it is a Windows', function () { | ||
it('should correctly return Windows System if it is a Windows', function () { | ||
let osMock = sinon.mock(os); | ||
@@ -27,3 +27,3 @@ osMock.expects('type').returns('Windows_NT'); | ||
it('should correctly return Mac if it is a Mac', function () { | ||
it('should correctly return Mac if it is a Mac', function () { | ||
let osMock = sinon.mock(os); | ||
@@ -45,3 +45,3 @@ osMock.expects('type').returns('Darwin'); | ||
describe('architecture', function () { | ||
describe('architecture', function () { | ||
beforeEach(() => { | ||
@@ -59,3 +59,3 @@ sandbox = sinon.sandbox.create(); | ||
it('should return correct architecture if it is a 64 bit Mac/Linux', async function() { | ||
it('should return correct architecture if it is a 64 bit Mac/Linux', async function() { | ||
mocks.os.expects('type').thrice().returns('Darwin'); | ||
@@ -62,0 +62,0 @@ mocks.teen_process.expects('exec').once().withExactArgs('uname', ['-m']).returns({stdout: 'x86_64'}); |
"use strict"; | ||
import * as tempDir from '../lib/tempdir'; | ||
import { tempDir } from '../..'; | ||
import fs from 'fs'; | ||
@@ -10,3 +10,3 @@ import chai from 'chai'; | ||
describe('tempdir', function () { | ||
it('should be able to generate a path', async function () { | ||
it('should be able to generate a path', async () => { | ||
let path = await tempDir.path({prefix: 'myfile', suffix: '.tmp'}); | ||
@@ -17,3 +17,3 @@ path.should.exist; | ||
it('should be able to create a temp file', async function () { | ||
it('should be able to create a temp file', async () => { | ||
let res = await tempDir.open({prefix: 'my-test-file', suffix: '.zip'}); | ||
@@ -26,3 +26,21 @@ res.should.exist; | ||
}); | ||
it('should generate a random temp dir', async () => { | ||
let res = await tempDir.openDir(); | ||
res.should.be.a('string'); | ||
fs.existsSync(res).should.be.ok; | ||
let res2 = await tempDir.openDir(); | ||
fs.existsSync(res2).should.be.ok; | ||
res.should.not.equal(res2); | ||
}); | ||
it('should generate one temp dir used for the life of the process', async () => { | ||
let res = await tempDir.staticDir(); | ||
res.should.be.a('string'); | ||
fs.existsSync(res).should.be.ok; | ||
let res2 = await tempDir.staticDir(); | ||
fs.existsSync(res2).should.be.ok; | ||
res.should.equal(res2); | ||
}); | ||
}); | ||
"use strict"; | ||
import * as util from '../lib/util'; | ||
import { util } from '../..'; | ||
import _rimraf from 'rimraf'; | ||
@@ -25,3 +25,3 @@ import path from 'path'; | ||
it('should handle not a number', function () { | ||
it('should handle not a number', function () { | ||
util.hasValue(NaN).should.be.false; | ||
@@ -125,3 +125,3 @@ }); | ||
exists.should.be.true; | ||
}); | ||
@@ -146,10 +146,10 @@ | ||
let dirName = path.resolve(__dirname, "tmp"); | ||
it("should make a directory that doesn't exist", async function () { | ||
await rimraf(dirName); | ||
await rimraf(dirName); | ||
await util.mkdir(dirName); | ||
let exists = await util.hasAccess(dirName); | ||
exists.should.be.true; | ||
exists.should.be.true; | ||
}); | ||
it("should not complain if the dir already exists", async function () { | ||
@@ -162,3 +162,3 @@ let exists = await util.hasAccess(dirName); | ||
it("should still throw an error if something else goes wrong", async function () { | ||
await util.mkdir("/bin/foo").should.be.rejected; | ||
await util.mkdir("/bin/foo").should.be.rejected; | ||
}); | ||
@@ -165,0 +165,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 2 instances 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
162317
33
1221
2