@wdio/utils
Advanced tools
Comparing version 6.2.0 to 6.3.0
@@ -6,2 +6,3 @@ "use strict"; | ||
}); | ||
exports.isW3C = isW3C; | ||
exports.capabilitiesEnvironmentDetector = capabilitiesEnvironmentDetector; | ||
@@ -8,0 +9,0 @@ exports.sessionEnvironmentDetector = sessionEnvironmentDetector; |
@@ -66,2 +66,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "canAccess", { | ||
enumerable: true, | ||
get: function () { | ||
return _utils.canAccess; | ||
} | ||
}); | ||
Object.defineProperty(exports, "wrapCommand", { | ||
@@ -115,2 +121,8 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "isW3C", { | ||
enumerable: true, | ||
get: function () { | ||
return _envDetector.isW3C; | ||
} | ||
}); | ||
Object.defineProperty(exports, "capabilitiesEnvironmentDetector", { | ||
@@ -117,0 +129,0 @@ enumerable: true, |
@@ -15,2 +15,8 @@ "use strict"; | ||
exports.isBase64 = isBase64; | ||
exports.canAccess = void 0; | ||
var _fs = _interopRequireDefault(require("fs")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
const SCREENSHOT_REPLACEMENT = '"<Screenshot[base64]>"'; | ||
@@ -170,2 +176,18 @@ | ||
return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '='; | ||
} | ||
} | ||
const canAccess = file => { | ||
if (!file) { | ||
return false; | ||
} | ||
try { | ||
_fs.default.accessSync(file); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
}; | ||
exports.canAccess = canAccess; |
{ | ||
"name": "@wdio/utils", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "A WDIO helper utility to provide several utility functions used across the project.", | ||
@@ -39,3 +39,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "aa726eb714e6f9cd8d6e59dba8af97c79053547f" | ||
"gitHead": "1712ef3be66f25607f61d06af59385af433742cd" | ||
} |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
30765
892
7