health-check-api
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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),_healthCheckCore=require("health-check-core"),_healthCheckCore2=_interopRequireDefault(_healthCheckCore),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"do",value:function(e){return new Promise(function(r,t){var o={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.method+":"+e.configuration.url},fnErrorMessage:function(e){return e.error.message}};_healthCheckCore2["default"]["do"](e,_repository2["default"].test,o).then(function(e){r(e)})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck,HealthCheck["do"]({url:"htp://globo.com",method:"GET",expectedStatusCode:300}).then(function(e){return console.log(e)})["catch"](function(e){return 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),_healthCheckCore=require("health-check-core"),_healthCheckCore2=_interopRequireDefault(_healthCheckCore),HealthCheck=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"do",value:function(e){return new Promise(function(r,t){var n={fnIsHealthGood:function(e){return null===e.error},fnName:function(e){return e.configuration.method+":"+e.configuration.url},fnErrorMessage:function(e){return e.error.message}};_healthCheckCore2["default"]["do"](e,_repository2["default"].test,n).then(function(e){r(e)})["catch"](function(e){t(e)})})}}]),e}();exports["default"]=HealthCheck; |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"license": "MIT", | ||
@@ -11,0 +11,0 @@ "author": { |
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
4735