health-check-redis
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(r,t,o){return t&&e(r.prototype,t),o&&e(r,o),r}}();Object.defineProperty(exports,"__esModule",{value:!0});var _repository=require("./repository"),_repository2=_interopRequireDefault(_repository),_healthCheckMessageFormat=require("health-check-message-format"),_healthCheckMessageFormat2=_interopRequireDefault(_healthCheckMessageFormat),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"_resolveParameter",value:function(e){return Array.isArray(e)||(e=[e]),e}},{key:"do",value:function(e){return e=this._resolveParameter(e),new Promise(function(r,t){var o=[];e.forEach(function(e){o.push(_repository2["default"].test(e))}),Promise.all(o).then(function(e){var t={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.host+":\n "+e.configuration.port},fnErrorMessage:function(e){return e.error.message}};r(_healthCheckMessageFormat2["default"]["do"](e,t))})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck,HealthCheck["do"]([{host:"127.0.0.1",port:6379},{host:"wrong host",port:6379}]).then(function(e){console.log(e)})["catch"](function(e){console.log(e)}); | ||
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}();Object.defineProperty(exports,"__esModule",{value:!0});var _repository=require("./repository"),_repository2=_interopRequireDefault(_repository),_healthCheckMessageFormat=require("health-check-message-format"),_healthCheckMessageFormat2=_interopRequireDefault(_healthCheckMessageFormat),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"_resolveParameter",value:function(e){return Array.isArray(e)||(e=[e]),e}},{key:"do",value:function(e){return e=this._resolveParameter(e),new Promise(function(r,t){var n=[];e.forEach(function(e){n.push(_repository2["default"].test(e))}),Promise.all(n).then(function(e){var t={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.host+":\n "+e.configuration.port},fnErrorMessage:function(e){return e.error.message}};r(_healthCheckMessageFormat2["default"]["do"](e,t))})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck; |
@@ -5,3 +5,3 @@ { | ||
"repository": "https://github.com/LucasRodrigues/health-check-redis", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
20710
16