appium-support
Advanced tools
Comparing version 2.0.0-beta4 to 2.0.0-beta5
@@ -24,4 +24,2 @@ 'use strict'; | ||
var _appiumLogger = require('appium-logger'); | ||
var _fs = require('./fs'); | ||
@@ -31,4 +29,2 @@ | ||
var logger = (0, _appiumLogger.getLogger)('Appium-Support'); | ||
function hasContent(val) { | ||
@@ -80,3 +76,3 @@ return _lodash2['default'].isString(val) && val !== ''; | ||
case 3: | ||
context$1$0.next = 8; | ||
context$1$0.next = 9; | ||
break; | ||
@@ -88,7 +84,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': | ||
@@ -131,2 +130,2 @@ return context$1$0.stop(); | ||
// TODO: deprecate, use fs.hasAccess instead | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi91dGlsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztRQVFnQixVQUFVLEdBQVYsVUFBVTs7d0JBUlosVUFBVTs7OztzQkFDVixRQUFROzs7O2tCQUNQLElBQUk7Ozs7NEJBQ08sZUFBZTs7a0JBQzFCLE1BQU07Ozs7QUFFckIsSUFBSSxNQUFNLEdBQUcsa0JBSEosU0FBUyxFQUdLLGdCQUFnQixDQUFDLENBQUM7O0FBRWxDLFNBQVMsVUFBVSxDQUFFLEdBQUcsRUFBRTtBQUMvQixTQUFPLG9CQUFFLFFBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxHQUFHLEtBQUssRUFBRSxDQUFDO0NBQ3RDOzs7QUFHRCxTQUFTLFFBQVEsQ0FBRSxHQUFHLEVBQUU7QUFDdEIsTUFBSSxNQUFNLEdBQUcsS0FBSyxDQUFDOztBQUVuQixN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XNvbHZlKSA9PiB7XG4gICAgdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgcmVzb2x2ZSgpO1xuICAgIH0sIG1zKTtcbiAgfSlcbiAgLmNhbmNlbGxhYmxlKClcbiAgLmNhdGNoKEIuQ2FuY2VsbGF0aW9uRXJyb3IsIChlcnIpID0+IHtcbiAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgIHRocm93IGVycjtcbiAgfSk7XG59XG5cbmV4cG9ydCB7IGhhc1ZhbHVlLCBlc2NhcGVTcGFjZSwgaGFzQWNjZXNzLCBta2RpciwgbG9jYWxJcCwgY2FuY2VsbGFibGVEZWxheSB9O1xuIl19 |
@@ -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).should.be.ok; | ||
case 11: | ||
res.should.equal(res2); | ||
case 10: | ||
case 12: | ||
case 'end': | ||
@@ -129,2 +136,2 @@ return context$2$0.stop(); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvdGVtcGRpci1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLENBQUM7Ozs7OztnQkFFVyxPQUFPOztrQkFDaEIsSUFBSTs7OztvQkFDRixNQUFNOzs7O0FBRXZCLGtCQUFLLE1BQU0sRUFBRSxDQUFDOztBQUVkLFFBQVEsQ0FBQyxTQUFTLEVBQUUsWUFBWTs7O0FBQzlCLElBQUUsQ0FBQyxtQ0FBbUMsRUFBRTtRQUNsQyxJQUFJOzs7OzsyQ0FBUyxFQVJaLE9BQU8sQ0FRYSxJQUFJLENBQUMsRUFBQyxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUMsQ0FBQzs7O0FBQTdELGNBQUk7O0FBQ1IsY0FBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7QUFDbEIsY0FBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUM7Ozs7Ozs7R0FDbkMsQ0FBQyxDQUFDOztBQUVILElBQUUsQ0FBQyxzQ0FBc0MsRUFBRTtRQUNyQyxHQUFHOzs7OzsyQ0FBUyxFQWRYLE9BQU8sQ0FjWSxJQU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cigpO1xuICAgIHJlcy5zaG91bGQuYmUuYSgnc3RyaW5nJyk7XG4gICAgYXdhaXQgZnMuZXhpc3RzKHJlcykuc2hvdWxkLmV2ZW50dWFsbHkuYmUub2s7XG4gICAgbGV0IHJlczIgPSBhd2FpdCB0ZW1wRGlyLnN0YXRpY0RpcigpO1xuICAgIGF3YWl0IGZzLmV4aXN0cyhyZXMyKS5zaG91bGQuZXZlbnR1YWxseS5iZS5vaztcbiAgICByZXMuc2hvdWxkLmVxdWFsKHJlczIpO1xuICB9KTtcbn0pO1xuXG4iXX0= |
import B from 'bluebird'; | ||
import _ from 'lodash'; | ||
import os from 'os'; | ||
import { getLogger } from 'appium-logger'; | ||
import fs from './fs'; | ||
let logger = getLogger('Appium-Support'); | ||
export function hasContent (val) { | ||
@@ -39,8 +36,8 @@ return _.isString(val) && val !== ""; | ||
async function mkdir (dirName) { | ||
try { | ||
try { | ||
await fs.mkdir(dirName); | ||
} catch (err) { | ||
if (err && err.code !== "EEXIST") { | ||
logger.errorAndThrow(err); | ||
} | ||
throw err; | ||
} | ||
} | ||
@@ -47,0 +44,0 @@ } |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "2.0.0-beta4", | ||
"version": "2.0.0-beta5", | ||
"author": "appium", | ||
@@ -10,0 +10,0 @@ "license": "Apache-2.0", |
"use strict"; | ||
import { tempDir } from '../..'; | ||
import fs from 'fs'; | ||
import { tempDir, fs } from '../..'; | ||
import chai from 'chai'; | ||
@@ -22,3 +21,3 @@ | ||
res.fd.should.exist; | ||
fs.existsSync(res.path).should.be.ok; | ||
await fs.exists(res.path).should.eventually.be.ok; | ||
}); | ||
@@ -29,5 +28,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 +38,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 +43,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 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
203726
42
1474
6
1