appium-logger
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -46,3 +46,4 @@ 'use strict'; | ||
var testingMode = parseInt(process.env._TESTING, 10) === 1; | ||
return testingMode ? mockLog : global._global_npmlog || _npmlog2['default']; | ||
var forceLogMode = parseInt(process.env._FORCE_LOGS, 10) === 1; | ||
return testingMode && !forceLogMode ? mockLog : global._global_npmlog || _npmlog2['default']; | ||
} | ||
@@ -53,2 +54,2 @@ | ||
exports['default'] = log; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9sb2dnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztRQVFnQixTQUFTLEdBQVQsU0FBUzs7c0JBUk4sUUFBUTs7OztBQUUzQixJQUFNLFNBQVMsR0FBRyxDQUFDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDeEUsSUFBSSxPQUFPLEdBQUcsRUFBRSxDQUFDOzs7Ozs7QUFDakIseUNBQWMsU0FBUyw0R0FBRTtRQUFoQixDQUFDOztBQUNSLFdBQU8sQ0FBQyxDQUFDLENBQUMsR0FBRyxZQUFNLEVBQUUsQ0FBQztHQUN2Qjs7Ozs7Ozs7Ozs7Ozs7OztBQUVNLFNBQVMsU0FBUyxHQUFJO0FBQzNCLE1BQU0sV0FBVyxHQUFHLFFBQVEsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFFBQVEsRUFBRSxFQUFFLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDN0QsU0FBTyxXQUFXLEdBQUcsT0FBTyxHQUFJLE1BQU0sQ0FBQyxjQUFjLHVCQUFVLEFBQUMsQ0FBQztDQUNsRTs7QUFFRCxJQUFNLEdBQUcsR0FBRyxTQUFTLEVBQUUsQ0FBQzs7cUJBRVQsR0FBRyIsImZpbGUiOiJsaWIv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YmFsLl9nbG9iYWxfbnBtbG9nIHx8IG5wbWxvZyk7XG59XG5cbmNvbnN0IGxvZyA9IGdldExvZ2dlcigpO1xuXG5leHBvcnQgZGVmYXVsdCBsb2c7XG4iXX0= |
@@ -32,4 +32,5 @@ 'use strict'; | ||
function getDynamicLogger(testingMode) { | ||
function getDynamicLogger(testingMode, forceLogs) { | ||
process.env._TESTING = testingMode ? '1' : '0'; | ||
process.env._FORCE_LOGS = forceLogs ? '1' : '0'; | ||
return _getLogger.getLogger(); | ||
@@ -132,2 +133,2 @@ } | ||
exports.getDynamicLogger = getDynamicLogger; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvaGVscGVycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O29CQUFpQixNQUFNOzs7O3FCQUNMLE9BQU87Ozs7c0JBQ1gsUUFBUTs7Ozt5QkFDSSxlQUFlOztBQUN6QyxrQkFBSyxNQUFNLEVBQUUsQ0FBQzs7QUFFZCxTQUFTLFlBQVksR0FBSTtBQUN2QixTQUFPLEVBQUMsUUFBVSxtQkFBTSxHQUFHLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUM7QUFDNUMsWUFBVSxtQkFBTSxHQUFHLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsRUFBQyxDQUFDO0NBQ3ZEOztBQUVELFNBQVMsZ0JBQWdCLENBQUUsV0FBVyxFQUFFO0FBQ3RDLFNBQU8sQ0FBQyxHQUFHLENBQUMsUUFBUSxHQUFHLFdBQVcsR0FBRyxHQUFHLEdBQUcsR0FBRyxDQUFDO0FBQy9DLFNBQU8sV0FWQSxTQUFTLEVBVUUsQ0FBQztDQUNwQjs7QUFFRCxTQUFTLGNBQWMsQ0FBRSxPQUFPLEVBQUU7Ozs7OztBQUNoQywyQ0FBYyxvQkFBRSxNQUFNLENBQUMsT0FB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Rpb24gcmVzdG9yZVdyaXRlcnMgKHdyaXRlcnMpIHtcbiAgZm9yIChsZXQgdyBvZiBfLnZhbHVlcyh3cml0ZXJzKSkge1xuICAgIHcucmVzdG9yZSgpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGFzc2VydE91dHB1dENvbnRhaW5zICh3cml0ZXJzLCBvdXRwdXQpIHtcbiAgbGV0IHNvbWVvbmVIYWRPdXRwdXQgPSBmYWxzZTtcbiAgZm9yIChsZXQgdyBvZiBfLnZhbHVlcyh3cml0ZXJzKSkge1xuICAgIGlmICh3LmNhbGxlZFdpdGgpIHtcbiAgICAgIHNvbWVvbmVIYWRPdXRwdXQgPSB3LmNhbGxlZFdpdGgob3V0cHV0KTtcbiAgICAgIGlmIChzb21lb25lSGFkT3V0cHV0KSBicmVhaztcbiAgICB9XG4gIH1cbiAgaWYgKCFzb21lb25lSGFkT3V0cHV0KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgc29tZW9uZSB0byBoYXZlIGJlZW4gY2FsbGVkIHdpdGg6ICdcIiArIG91dHB1dCArIFwiJ1wiKTtcbiAgfVxufVxuXG5mdW5jdGlvbiBhc3NlcnRPdXRwdXREb2VzbnRDb250YWluICh3cml0ZXJzLCBvdXRwdXQpIHtcbiAgZm9yIChsZXQgdyBvZiBfLnZhbHVlcyh3cml0ZXJzKSkge1xuICAgIF8uZmxhdHRlbih3LmFyZ3MpLnNob3VsZC5ub3QuY29udGFpbihvdXRwdXQpO1xuICB9XG59XG5cbmV4cG9ydCB7IHNldHVwV3JpdGVycywgcmVzdG9yZVdyaXRlcnMsIGFzc2VydE91dHB1dENvbnRhaW5zLFxuICAgICAgICAgYXNzZXJ0T3V0cHV0RG9lc250Q29udGFpbiwgZ2V0RHluYW1pY0xvZ2dlciB9O1xuIl19 |
@@ -12,3 +12,3 @@ 'use strict'; | ||
writers = _getDynamicLogger$restoreWriters$setupWriters$assertOutputContains.setupWriters(); | ||
log = _getDynamicLogger$restoreWriters$setupWriters$assertOutputContains.getDynamicLogger(false); | ||
log = _getDynamicLogger$restoreWriters$setupWriters$assertOutputContains.getDynamicLogger(false, false); | ||
log.level = 'silly'; | ||
@@ -37,2 +37,2 @@ }); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvbG9nZ2VyLW5vcm1hbC1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztpRkFHcUMsV0FBVzs7QUFIaEQsT0FBTyxDQUFDLG9CQUFvQixDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7O0FBS3hDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsWUFBTTtBQUN2QixNQUFJLE9BQU8sWUFBQTtNQUFFLEdBQUcsWUFBQSxDQUFDO0FBQ2pCLFFBQU0sQ0FBQyxZQUFNO0FBQ1gsV0FBTyxHQUFHLG1FQU42QixZQUFZLEVBTTNCLENBQUM7QUFDekIsT0FBRyxHQUFHLG1FQVBELGdCQUFnQixDQU9FLEtBQUssQ0FBQyxDQUFDO0FBQzlCLE9BQUcsQ0FBQyxLQUFLLEdBQUcsT0FBTyxDQUFDO0dBQ3JCLENBQUMsQ0FBQzs7QUFFSCxPQUFLLENBQUMsWUFBTTtBQUNWLHVFQVp1QixjQUFjLENBWXRCLE9BQU8sQ0FBQyxDQUFDO0dBQ3pCLENBQUMsQ0FBQzs7QUFFSCxJQUFFLENBQUMsa0RBQWtELEVBQUUsWUFBTTtBQUMzRCxPQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQ25CLHVFQWhCSyxvQkFBb0IsQ0FnQkosT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQ3ZDLE9BQUcsQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUM7QUFDdkIsdUVBbEJLLG9CQUFvQixDQWtCSixPQUFPLEVBQUUsU0FBUyxDQUFDLENB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gbG9nLmluZm8oJ2luZm8nKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnaW5mbycpO1xuICAgIGxvZy5odHRwKCdodHRwJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ2h0dHAnKTtcbiAgICBsb2cud2Fybignd2FybicpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICd3YXJuJyk7XG4gICAgbG9nLmVycm9yKG51bGwsICdlcnJvcicpO1xuICAgIC8vIG5wbWxvZyBhZGRzIGEgc3BhY2UgYmVmb3JlIGFuZCBhIG5ld2xpbmUgYWZ0ZXIgZXJyb3IgbWVzc2FnZXNcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnIGVycm9yXFxuJyk7XG4gIH0pO1xufSk7XG4iXX0= |
@@ -6,2 +6,6 @@ "use strict"; | ||
boilerplate({build: 'appium-logger', jscs: false}); | ||
boilerplate({ | ||
build: 'appium-logger', | ||
jscs: false, | ||
testReporter: process.env.TRAVIS ? 'spec' : 'nyan' | ||
}); |
@@ -11,3 +11,5 @@ import npmlog from 'npmlog'; | ||
const testingMode = parseInt(process.env._TESTING, 10) === 1; | ||
return testingMode ? mockLog : (global._global_npmlog || npmlog); | ||
const forceLogMode = parseInt(process.env._FORCE_LOGS, 10) === 1; | ||
return (testingMode && !forceLogMode) ? mockLog : | ||
(global._global_npmlog || npmlog); | ||
} | ||
@@ -14,0 +16,0 @@ |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "appium", | ||
@@ -27,5 +27,5 @@ "license": "Apache License 2.0", | ||
"dependencies": { | ||
"babel-runtime": "^5.0.12", | ||
"npmlog": "^1.2.0", | ||
"q": "^1.1.2", | ||
"babel-runtime": "^5.4.7", | ||
"npmlog": "^1.2.1", | ||
"q": "^1.4.1", | ||
"source-map-support": "^0.2.10" | ||
@@ -40,6 +40,6 @@ }, | ||
"appium-gulp-plugins": "^1.0.3", | ||
"chai": "^2.2.0", | ||
"chai-as-promised": "^4.1.1", | ||
"chai": "^2.3.0", | ||
"chai-as-promised": "^5.0.0", | ||
"gulp": "^3.8.11", | ||
"lodash": "^3.6.0", | ||
"lodash": "^3.9.1", | ||
"mochawait": "^2.0.0", | ||
@@ -46,0 +46,0 @@ "sinon": "^1.14.1" |
appium-logger | ||
=================== | ||
[![Build Status](https://travis-ci.org/appium/logger.svg?branch=master)](https://travis-ci.org/appium/logger) | ||
Basic logger defaulting to `npmlog` with special consideration for running | ||
@@ -5,0 +7,0 @@ tests (doesn't output logs when run with `_TESTING=1` in the env). |
@@ -12,4 +12,5 @@ import chai from 'chai'; | ||
function getDynamicLogger (testingMode) { | ||
function getDynamicLogger (testingMode, forceLogs) { | ||
process.env._TESTING = testingMode ? '1' : '0'; | ||
process.env._FORCE_LOGS = forceLogs ? '1' : '0'; | ||
return getLogger(); | ||
@@ -16,0 +17,0 @@ } |
@@ -10,3 +10,3 @@ // transpile:mocha | ||
writers = setupWriters(); | ||
log = getDynamicLogger(false); | ||
log = getDynamicLogger(false, false); | ||
log.level = 'silly'; | ||
@@ -35,2 +35,1 @@ }); | ||
}); | ||
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
29447
19
372
14
9
Updatedbabel-runtime@^5.4.7
Updatednpmlog@^1.2.1
Updatedq@^1.4.1