Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sendim

Package Overview
Dependencies
Maintainers
1
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sendim - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

32

dist/sendim.cjs.development.js

@@ -118,16 +118,18 @@ 'use strict';

if (transport) {
_context2.next = 7;
_context2.next = 8;
break;
}
this.logger.debug("[SENDIM] Send raw email", options);
_context2.next = 10;
this.logger.debug("[SENDIM] Send raw email");
this.logger.debug(options);
_context2.next = 12;
break;
case 7:
this.logger.debug("[SENDIM] Send raw email (Transport: " + transport.providerName + ") ", options);
_context2.next = 10;
case 8:
this.logger.debug("[SENDIM] Send raw email (Transport: " + transport.providerName + ") ");
this.logger.debug(options);
_context2.next = 12;
return transport.sendRawMail(options);
case 10:
case 12:
case "end":

@@ -167,16 +169,18 @@ return _context2.stop();

if (transport) {
_context3.next = 7;
_context3.next = 8;
break;
}
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + ")", options);
_context3.next = 10;
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + ")");
this.logger.debug(options);
_context3.next = 12;
break;
case 7:
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + " / Transport: " + transport.providerName + ") ", options);
_context3.next = 10;
case 8:
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + " / Transport: " + transport.providerName + ") ");
this.logger.debug(options);
_context3.next = 12;
return transport.sendTransactionalMail(options);
case 10:
case 12:
case "end":

@@ -183,0 +187,0 @@ return _context3.stop();

@@ -1,2 +0,2 @@

"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(require("regenerator-runtime")),e=t(require("pino"));function n(t,r,e,n,a,s,i){try{var o=t[s](i),u=o.value}catch(t){return void e(t)}o.done?r(u):Promise.resolve(u).then(n,a)}function a(t){return function(){var r=this,e=arguments;return new Promise((function(a,s){var i=t.apply(r,e);function o(t){n(i,a,s,o,u,"next",t)}function u(t){n(i,a,s,o,u,"throw",t)}o(void 0)}))}}exports.Sendim=function(){function t(t){this.transports={},this.logger=e({level:t||"info"})}var n=t.prototype;return n.addTransport=function(){var t=a(r.mark((function t(e,n){var a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new e(n),t.next=3,a.isHealthy();case 3:if(t.sent){t.next=6;break}return this.logger.error("[SENDIM] Transport "+a.providerName+" is not healthy !"),t.abrupt("return");case 6:this.transports[a.providerName]=a;case 7:case"end":return t.stop()}}),t,this)})));return function(r,e){return t.apply(this,arguments)}}(),n.sendRawMail=function(){var t=a(r.mark((function t(e,n){var a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(this.transports),n&&this.transports[n]&&(s=this.transports[n]),!s&&(null==a?void 0:a.length)>0&&(s=this.transports[a[0]]),s){t.next=7;break}this.logger.debug("[SENDIM] Send raw email",e),t.next=10;break;case 7:return this.logger.debug("[SENDIM] Send raw email (Transport: "+s.providerName+") ",e),t.next=10,s.sendRawMail(e);case 10:case"end":return t.stop()}}),t,this)})));return function(r,e){return t.apply(this,arguments)}}(),n.sendTransactionalMail=function(){var t=a(r.mark((function t(e,n){var a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(this.transports),n&&this.transports[n]&&(s=this.transports[n]),!s&&(null==a?void 0:a.length)>0&&(s=this.transports[a[0]]),s){t.next=7;break}this.logger.debug("[SENDIM] Send transactional email (Template: "+e.templateId+")",e),t.next=10;break;case 7:return this.logger.debug("[SENDIM] Send transactional email (Template: "+e.templateId+" / Transport: "+s.providerName+") ",e),t.next=10,s.sendTransactionalMail(e);case 10:case"end":return t.stop()}}),t,this)})));return function(r,e){return t.apply(this,arguments)}}(),t}(),exports.SendimTransportInterface=function(t){};
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("regenerator-runtime")),r=t(require("pino"));function n(t,e,r,n,a,s,i){try{var o=t[s](i),u=o.value}catch(t){return void r(t)}o.done?e(u):Promise.resolve(u).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,s){var i=t.apply(e,r);function o(t){n(i,a,s,o,u,"next",t)}function u(t){n(i,a,s,o,u,"throw",t)}o(void 0)}))}}exports.Sendim=function(){function t(t){this.transports={},this.logger=r({level:t||"info"})}var n=t.prototype;return n.addTransport=function(){var t=a(e.mark((function t(r,n){var a;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=new r(n),t.next=3,a.isHealthy();case 3:if(t.sent){t.next=6;break}return this.logger.error("[SENDIM] Transport "+a.providerName+" is not healthy !"),t.abrupt("return");case 6:this.transports[a.providerName]=a;case 7:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),n.sendRawMail=function(){var t=a(e.mark((function t(r,n){var a,s;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(this.transports),n&&this.transports[n]&&(s=this.transports[n]),!s&&(null==a?void 0:a.length)>0&&(s=this.transports[a[0]]),s){t.next=8;break}this.logger.debug("[SENDIM] Send raw email"),this.logger.debug(r),t.next=12;break;case 8:return this.logger.debug("[SENDIM] Send raw email (Transport: "+s.providerName+") "),this.logger.debug(r),t.next=12,s.sendRawMail(r);case 12:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),n.sendTransactionalMail=function(){var t=a(e.mark((function t(r,n){var a,s;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object.keys(this.transports),n&&this.transports[n]&&(s=this.transports[n]),!s&&(null==a?void 0:a.length)>0&&(s=this.transports[a[0]]),s){t.next=8;break}this.logger.debug("[SENDIM] Send transactional email (Template: "+r.templateId+")"),this.logger.debug(r),t.next=12;break;case 8:return this.logger.debug("[SENDIM] Send transactional email (Template: "+r.templateId+" / Transport: "+s.providerName+") "),this.logger.debug(r),t.next=12,s.sendTransactionalMail(r);case 12:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),t}(),exports.SendimTransportInterface=function(t){};
//# sourceMappingURL=sendim.cjs.production.min.js.map

@@ -112,16 +112,18 @@ import _regeneratorRuntime from 'regenerator-runtime';

if (transport) {
_context2.next = 7;
_context2.next = 8;
break;
}
this.logger.debug("[SENDIM] Send raw email", options);
_context2.next = 10;
this.logger.debug("[SENDIM] Send raw email");
this.logger.debug(options);
_context2.next = 12;
break;
case 7:
this.logger.debug("[SENDIM] Send raw email (Transport: " + transport.providerName + ") ", options);
_context2.next = 10;
case 8:
this.logger.debug("[SENDIM] Send raw email (Transport: " + transport.providerName + ") ");
this.logger.debug(options);
_context2.next = 12;
return transport.sendRawMail(options);
case 10:
case 12:
case "end":

@@ -161,16 +163,18 @@ return _context2.stop();

if (transport) {
_context3.next = 7;
_context3.next = 8;
break;
}
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + ")", options);
_context3.next = 10;
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + ")");
this.logger.debug(options);
_context3.next = 12;
break;
case 7:
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + " / Transport: " + transport.providerName + ") ", options);
_context3.next = 10;
case 8:
this.logger.debug("[SENDIM] Send transactional email (Template: " + options.templateId + " / Transport: " + transport.providerName + ") ");
this.logger.debug(options);
_context3.next = 12;
return transport.sendTransactionalMail(options);
case 10:
case 12:
case "end":

@@ -177,0 +181,0 @@ return _context3.stop();

{
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",

@@ -4,0 +4,0 @@ "main": "dist/index.js",

@@ -83,8 +83,10 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

if (!transport) {
this.logger.debug(`[SENDIM] Send raw email`, options);
this.logger.debug(`[SENDIM] Send raw email`);
this.logger.debug(options);
} else {
this.logger.debug(
`[SENDIM] Send raw email (Transport: ${transport.providerName}) `,
options,
);
this.logger.debug(options);
await transport.sendRawMail(options);

@@ -115,9 +117,10 @@ }

`[SENDIM] Send transactional email (Template: ${options.templateId})`,
options,
);
this.logger.debug(options);
} else {
this.logger.debug(
`[SENDIM] Send transactional email (Template: ${options.templateId} / Transport: ${transport.providerName}) `,
options,
);
this.logger.debug(options);
await transport.sendTransactionalMail(options);

@@ -124,0 +127,0 @@ }

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc