Comparing version 1.0.0 to 1.0.1
@@ -91,3 +91,3 @@ 'use strict'; | ||
this.logger.error("[SAVIM] Transport " + newProvider.name + " is not healthy !"); | ||
this.logger.error("[SAVIM] Provider " + newProvider.name + " is not healthy !"); | ||
return _context.abrupt("return"); | ||
@@ -94,0 +94,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("regenerator-runtime")),t=r(require("pino"));function n(r,e,t,n,i,o,u){try{var a=r[o](u),s=a.value}catch(r){return void t(r)}a.done?e(s):Promise.resolve(s).then(n,i)}function i(r){return function(){var e=this,t=arguments;return new Promise((function(i,o){var u=r.apply(e,t);function a(r){n(u,i,o,a,s,"next",r)}function s(r){n(u,i,o,a,s,"throw",r)}a(void 0)}))}}exports.Savim=function(){function r(r){var e=this;this.providers={},this.getInvolvedProvider=function(r){var t=Object.keys(e.providers),n=void 0;return r&&e.providers[r]?n=e.providers[r]:(null==t?void 0:t.length)>0&&(n=e.providers[t[0]]),n},this.logger=t({level:r||"info"})}var n=r.prototype;return n.addProvider=function(){var r=i(e.mark((function r(t,n){var i;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new t(n),r.next=3,i.isHealthy();case 3:if(r.sent){r.next=6;break}return this.logger.error("[SAVIM] Transport "+i.name+" is not healthy !"),r.abrupt("return");case 6:this.providers[i.name]=i;case 7:case"end":return r.stop()}}),r,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.uploadFile=function(){var r=i(e.mark((function r(t,n,i,o){var u;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===i&&(i={}),u=this.getInvolvedProvider(o),this.logger.debug("[SAVIM] Upload file "+(u?"(Provider: "+u.name+")":"(No provider)")+" "+(u?"(Provider: "+u.name+")":"(No provider)")+" "+t),this.logger.debug(i),!u){r.next=6;break}return r.abrupt("return",u.uploadFile(t,n,i));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n,i){return r.apply(this,arguments)}}(),n.getFile=function(){var r=i(e.mark((function r(t,n,i){var o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===n&&(n={}),o=this.getInvolvedProvider(i),this.logger.debug("[SAVIM] Get file "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+t),this.logger.debug(n),!o){r.next=6;break}return r.abrupt("return",o.getFile(t,n));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),n.deleteFile=function(){var r=i(e.mark((function r(t,n,i){var o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===n&&(n={}),o=this.getInvolvedProvider(i),this.logger.debug("[SAVIM] Delete file "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+(o?"(Provider: "+o.name+")":"(No provider)")),this.logger.debug(n),!o){r.next=6;break}return r.abrupt("return",o.deleteFile(t,n));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),r}(),exports.SavimProviderInterface=function(r){}; | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("regenerator-runtime")),t=r(require("pino"));function n(r,e,t,n,i,o,u){try{var a=r[o](u),s=a.value}catch(r){return void t(r)}a.done?e(s):Promise.resolve(s).then(n,i)}function i(r){return function(){var e=this,t=arguments;return new Promise((function(i,o){var u=r.apply(e,t);function a(r){n(u,i,o,a,s,"next",r)}function s(r){n(u,i,o,a,s,"throw",r)}a(void 0)}))}}exports.Savim=function(){function r(r){var e=this;this.providers={},this.getInvolvedProvider=function(r){var t=Object.keys(e.providers),n=void 0;return r&&e.providers[r]?n=e.providers[r]:(null==t?void 0:t.length)>0&&(n=e.providers[t[0]]),n},this.logger=t({level:r||"info"})}var n=r.prototype;return n.addProvider=function(){var r=i(e.mark((function r(t,n){var i;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new t(n),r.next=3,i.isHealthy();case 3:if(r.sent){r.next=6;break}return this.logger.error("[SAVIM] Provider "+i.name+" is not healthy !"),r.abrupt("return");case 6:this.providers[i.name]=i;case 7:case"end":return r.stop()}}),r,this)})));return function(e,t){return r.apply(this,arguments)}}(),n.uploadFile=function(){var r=i(e.mark((function r(t,n,i,o){var u;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===i&&(i={}),u=this.getInvolvedProvider(o),this.logger.debug("[SAVIM] Upload file "+(u?"(Provider: "+u.name+")":"(No provider)")+" "+(u?"(Provider: "+u.name+")":"(No provider)")+" "+t),this.logger.debug(i),!u){r.next=6;break}return r.abrupt("return",u.uploadFile(t,n,i));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n,i){return r.apply(this,arguments)}}(),n.getFile=function(){var r=i(e.mark((function r(t,n,i){var o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===n&&(n={}),o=this.getInvolvedProvider(i),this.logger.debug("[SAVIM] Get file "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+t),this.logger.debug(n),!o){r.next=6;break}return r.abrupt("return",o.getFile(t,n));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),n.deleteFile=function(){var r=i(e.mark((function r(t,n,i){var o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===n&&(n={}),o=this.getInvolvedProvider(i),this.logger.debug("[SAVIM] Delete file "+(o?"(Provider: "+o.name+")":"(No provider)")+" "+(o?"(Provider: "+o.name+")":"(No provider)")),this.logger.debug(n),!o){r.next=6;break}return r.abrupt("return",o.deleteFile(t,n));case 6:return r.abrupt("return",void 0);case 7:case"end":return r.stop()}}),r,this)})));return function(e,t,n){return r.apply(this,arguments)}}(),r}(),exports.SavimProviderInterface=function(r){}; | ||
//# sourceMappingURL=savim.cjs.production.min.js.map |
@@ -85,3 +85,3 @@ import _regeneratorRuntime from 'regenerator-runtime'; | ||
this.logger.error("[SAVIM] Transport " + newProvider.name + " is not healthy !"); | ||
this.logger.error("[SAVIM] Provider " + newProvider.name + " is not healthy !"); | ||
return _context.abrupt("return"); | ||
@@ -88,0 +88,0 @@ |
{ | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -42,3 +42,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
this.logger.error( | ||
`[SAVIM] Transport ${newProvider.name} is not healthy !`, | ||
`[SAVIM] Provider ${newProvider.name} is not healthy !`, | ||
); | ||
@@ -45,0 +45,0 @@ return; |
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
44594