@digipair/skill-sendmail 0.41.4 → 0.43.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -312,7 +312,7 @@ var SESSION_TIMEOUT = 1800; // 30 min
312
312
  var cookies = Cookies$1;
313
313
 
314
314
  var name = "nodemailer";
315
- var version = "6.9.14";
315
+ var version = "6.9.16";
316
316
  var description = "Easy as cake e-mail sending from your Node.js applications";
317
317
  var main = "lib/nodemailer.js";
318
318
  var scripts = {
@@ -335,7 +335,7 @@ var bugs = {
335
335
  };
336
336
  var homepage = "https://nodemailer.com/";
337
337
  var devDependencies = {
338
- "@aws-sdk/client-ses": "3.600.0",
338
+ "@aws-sdk/client-ses": "3.679.0",
339
339
  bunyan: "1.8.15",
340
340
  c8: "10.1.2",
341
341
  eslint: "8.57.0",
@@ -347,7 +347,7 @@ var devDependencies = {
347
347
  "nodemailer-ntlm-auth": "1.0.4",
348
348
  proxy: "1.0.2",
349
349
  "proxy-test-server": "1.0.0",
350
- "smtp-server": "3.13.4"
350
+ "smtp-server": "3.13.6"
351
351
  };
352
352
  var engines = {
353
353
  node: ">=6.0.0"
@@ -1439,6 +1439,10 @@ var mimeTypes$2 = new Map([
1439
1439
  "application/futuresplash",
1440
1440
  "spl"
1441
1441
  ],
1442
+ [
1443
+ "application/geo+json",
1444
+ "geojson"
1445
+ ],
1442
1446
  [
1443
1447
  "application/gnutar",
1444
1448
  "tgz"
@@ -6877,6 +6881,10 @@ var extensions = new Map([
6877
6881
  "geo",
6878
6882
  "application/vnd.dynageo"
6879
6883
  ],
6884
+ [
6885
+ "geojson",
6886
+ "application/geo+json"
6887
+ ],
6880
6888
  [
6881
6889
  "gex",
6882
6890
  "application/vnd.geometry-explorer"
@@ -11929,7 +11937,6 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11929
11937
  * @param {Array} tokens Tokens object
11930
11938
  * @return {Object} Address object
11931
11939
  */ function _handleAddress(tokens) {
11932
- var token;
11933
11940
  var isGroup = false;
11934
11941
  var state = "text";
11935
11942
  var address;
@@ -11944,7 +11951,8 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11944
11951
  var len;
11945
11952
  // Filter out <addresses>, (comments) and regular text
11946
11953
  for(i = 0, len = tokens.length; i < len; i++){
11947
- token = tokens[i];
11954
+ var token = tokens[i];
11955
+ var prevToken = i ? tokens[i - 1] : null;
11948
11956
  if (token.type === "operator") {
11949
11957
  switch(token.value){
11950
11958
  case "<":
@@ -11959,6 +11967,7 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11959
11967
  break;
11960
11968
  default:
11961
11969
  state = "text";
11970
+ break;
11962
11971
  }
11963
11972
  } else if (token.value) {
11964
11973
  if (state === "address") {
@@ -11967,7 +11976,12 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11967
11976
  // and so will we
11968
11977
  token.value = token.value.replace(/^[^<]*<\s*/, "");
11969
11978
  }
11970
- data[state].push(token.value);
11979
+ if (prevToken && prevToken.noBreak && data[state].length) {
11980
+ // join values
11981
+ data[state][data[state].length - 1] += token.value;
11982
+ } else {
11983
+ data[state].push(token.value);
11984
+ }
11971
11985
  }
11972
11986
  }
11973
11987
  // If there is no text but a comment, replace the two
@@ -12082,10 +12096,11 @@ function _create_class$k(Constructor, protoProps, staticProps) {
12082
12096
  * @return {Array} An array of operator|text tokens
12083
12097
  */ key: "tokenize",
12084
12098
  value: function tokenize() {
12085
- var chr, list = [];
12099
+ var list = [];
12086
12100
  for(var i = 0, len = this.str.length; i < len; i++){
12087
- chr = this.str.charAt(i);
12088
- this.checkChar(chr);
12101
+ var chr = this.str.charAt(i);
12102
+ var nextChr = i < len - 1 ? this.str.charAt(i + 1) : null;
12103
+ this.checkChar(chr, nextChr);
12089
12104
  }
12090
12105
  this.list.forEach(function(node) {
12091
12106
  node.value = (node.value || "").toString().trim();
@@ -12102,12 +12117,22 @@ function _create_class$k(Constructor, protoProps, staticProps) {
12102
12117
  *
12103
12118
  * @param {String} chr Character from the address field
12104
12119
  */ key: "checkChar",
12105
- value: function checkChar(chr) {
12120
+ value: function checkChar(chr, nextChr) {
12106
12121
  if (this.escaped) ; else if (chr === this.operatorExpecting) {
12107
12122
  this.node = {
12108
12123
  type: "operator",
12109
12124
  value: chr
12110
12125
  };
12126
+ if (nextChr && ![
12127
+ " ",
12128
+ " ",
12129
+ "\r",
12130
+ "\n",
12131
+ ",",
12132
+ ";"
12133
+ ].includes(nextChr)) {
12134
+ this.node.noBreak = true;
12135
+ }
12111
12136
  this.list.push(this.node);
12112
12137
  this.node = null;
12113
12138
  this.operatorExpecting = "";
@@ -17096,24 +17121,32 @@ var DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname
17096
17121
  var startTime = Date.now();
17097
17122
  this._setEnvelope(envelope, function(err, info) {
17098
17123
  if (err) {
17124
+ // create passthrough stream to consume to prevent OOM
17125
+ var stream = new PassThrough();
17126
+ if (typeof message.pipe === "function") {
17127
+ message.pipe(stream);
17128
+ } else {
17129
+ stream.write(message);
17130
+ stream.end();
17131
+ }
17099
17132
  return callback(err);
17100
17133
  }
17101
17134
  var envelopeTime = Date.now();
17102
- var stream = _this._createSendStream(function(err, str) {
17135
+ var stream1 = _this._createSendStream(function(err, str) {
17103
17136
  if (err) {
17104
17137
  return callback(err);
17105
17138
  }
17106
17139
  info.envelopeTime = envelopeTime - startTime;
17107
17140
  info.messageTime = Date.now() - envelopeTime;
17108
- info.messageSize = stream.outByteCount;
17141
+ info.messageSize = stream1.outByteCount;
17109
17142
  info.response = str;
17110
17143
  return callback(null, info);
17111
17144
  });
17112
17145
  if (typeof message.pipe === "function") {
17113
- message.pipe(stream);
17146
+ message.pipe(stream1);
17114
17147
  } else {
17115
- stream.write(message);
17116
- stream.end();
17148
+ stream1.write(message);
17149
+ stream1.end();
17117
17150
  }
17118
17151
  });
17119
17152
  }
package/index.esm.js CHANGED
@@ -290,7 +290,7 @@ var SESSION_TIMEOUT = 1800; // 30 min
290
290
  var cookies = Cookies$1;
291
291
 
292
292
  var name = "nodemailer";
293
- var version = "6.9.14";
293
+ var version = "6.9.16";
294
294
  var description = "Easy as cake e-mail sending from your Node.js applications";
295
295
  var main = "lib/nodemailer.js";
296
296
  var scripts = {
@@ -313,7 +313,7 @@ var bugs = {
313
313
  };
314
314
  var homepage = "https://nodemailer.com/";
315
315
  var devDependencies = {
316
- "@aws-sdk/client-ses": "3.600.0",
316
+ "@aws-sdk/client-ses": "3.679.0",
317
317
  bunyan: "1.8.15",
318
318
  c8: "10.1.2",
319
319
  eslint: "8.57.0",
@@ -325,7 +325,7 @@ var devDependencies = {
325
325
  "nodemailer-ntlm-auth": "1.0.4",
326
326
  proxy: "1.0.2",
327
327
  "proxy-test-server": "1.0.0",
328
- "smtp-server": "3.13.4"
328
+ "smtp-server": "3.13.6"
329
329
  };
330
330
  var engines = {
331
331
  node: ">=6.0.0"
@@ -1417,6 +1417,10 @@ var mimeTypes$2 = new Map([
1417
1417
  "application/futuresplash",
1418
1418
  "spl"
1419
1419
  ],
1420
+ [
1421
+ "application/geo+json",
1422
+ "geojson"
1423
+ ],
1420
1424
  [
1421
1425
  "application/gnutar",
1422
1426
  "tgz"
@@ -6855,6 +6859,10 @@ var extensions = new Map([
6855
6859
  "geo",
6856
6860
  "application/vnd.dynageo"
6857
6861
  ],
6862
+ [
6863
+ "geojson",
6864
+ "application/geo+json"
6865
+ ],
6858
6866
  [
6859
6867
  "gex",
6860
6868
  "application/vnd.geometry-explorer"
@@ -11907,7 +11915,6 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11907
11915
  * @param {Array} tokens Tokens object
11908
11916
  * @return {Object} Address object
11909
11917
  */ function _handleAddress(tokens) {
11910
- var token;
11911
11918
  var isGroup = false;
11912
11919
  var state = "text";
11913
11920
  var address;
@@ -11922,7 +11929,8 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11922
11929
  var len;
11923
11930
  // Filter out <addresses>, (comments) and regular text
11924
11931
  for(i = 0, len = tokens.length; i < len; i++){
11925
- token = tokens[i];
11932
+ var token = tokens[i];
11933
+ var prevToken = i ? tokens[i - 1] : null;
11926
11934
  if (token.type === "operator") {
11927
11935
  switch(token.value){
11928
11936
  case "<":
@@ -11937,6 +11945,7 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11937
11945
  break;
11938
11946
  default:
11939
11947
  state = "text";
11948
+ break;
11940
11949
  }
11941
11950
  } else if (token.value) {
11942
11951
  if (state === "address") {
@@ -11945,7 +11954,12 @@ function _create_class$k(Constructor, protoProps, staticProps) {
11945
11954
  // and so will we
11946
11955
  token.value = token.value.replace(/^[^<]*<\s*/, "");
11947
11956
  }
11948
- data[state].push(token.value);
11957
+ if (prevToken && prevToken.noBreak && data[state].length) {
11958
+ // join values
11959
+ data[state][data[state].length - 1] += token.value;
11960
+ } else {
11961
+ data[state].push(token.value);
11962
+ }
11949
11963
  }
11950
11964
  }
11951
11965
  // If there is no text but a comment, replace the two
@@ -12060,10 +12074,11 @@ function _create_class$k(Constructor, protoProps, staticProps) {
12060
12074
  * @return {Array} An array of operator|text tokens
12061
12075
  */ key: "tokenize",
12062
12076
  value: function tokenize() {
12063
- var chr, list = [];
12077
+ var list = [];
12064
12078
  for(var i = 0, len = this.str.length; i < len; i++){
12065
- chr = this.str.charAt(i);
12066
- this.checkChar(chr);
12079
+ var chr = this.str.charAt(i);
12080
+ var nextChr = i < len - 1 ? this.str.charAt(i + 1) : null;
12081
+ this.checkChar(chr, nextChr);
12067
12082
  }
12068
12083
  this.list.forEach(function(node) {
12069
12084
  node.value = (node.value || "").toString().trim();
@@ -12080,12 +12095,22 @@ function _create_class$k(Constructor, protoProps, staticProps) {
12080
12095
  *
12081
12096
  * @param {String} chr Character from the address field
12082
12097
  */ key: "checkChar",
12083
- value: function checkChar(chr) {
12098
+ value: function checkChar(chr, nextChr) {
12084
12099
  if (this.escaped) ; else if (chr === this.operatorExpecting) {
12085
12100
  this.node = {
12086
12101
  type: "operator",
12087
12102
  value: chr
12088
12103
  };
12104
+ if (nextChr && ![
12105
+ " ",
12106
+ " ",
12107
+ "\r",
12108
+ "\n",
12109
+ ",",
12110
+ ";"
12111
+ ].includes(nextChr)) {
12112
+ this.node.noBreak = true;
12113
+ }
12089
12114
  this.list.push(this.node);
12090
12115
  this.node = null;
12091
12116
  this.operatorExpecting = "";
@@ -17074,24 +17099,32 @@ var DNS_TIMEOUT = 30 * 1000; // how much to wait for resolveHostname
17074
17099
  var startTime = Date.now();
17075
17100
  this._setEnvelope(envelope, function(err, info) {
17076
17101
  if (err) {
17102
+ // create passthrough stream to consume to prevent OOM
17103
+ var stream = new PassThrough();
17104
+ if (typeof message.pipe === "function") {
17105
+ message.pipe(stream);
17106
+ } else {
17107
+ stream.write(message);
17108
+ stream.end();
17109
+ }
17077
17110
  return callback(err);
17078
17111
  }
17079
17112
  var envelopeTime = Date.now();
17080
- var stream = _this._createSendStream(function(err, str) {
17113
+ var stream1 = _this._createSendStream(function(err, str) {
17081
17114
  if (err) {
17082
17115
  return callback(err);
17083
17116
  }
17084
17117
  info.envelopeTime = envelopeTime - startTime;
17085
17118
  info.messageTime = Date.now() - envelopeTime;
17086
- info.messageSize = stream.outByteCount;
17119
+ info.messageSize = stream1.outByteCount;
17087
17120
  info.response = str;
17088
17121
  return callback(null, info);
17089
17122
  });
17090
17123
  if (typeof message.pipe === "function") {
17091
- message.pipe(stream);
17124
+ message.pipe(stream1);
17092
17125
  } else {
17093
- stream.write(message);
17094
- stream.end();
17126
+ stream1.write(message);
17127
+ stream1.end();
17095
17128
  }
17096
17129
  });
17097
17130
  }
@@ -1,2 +1,2 @@
1
1
  import { PinsSettings } from '@digipair/engine';
2
- export declare const send: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("nodemailer/lib/smtp-transport").SentMessageInfo>;
2
+ export declare const send: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<import("nodemailer/lib/smtp-pool").SentMessageInfo>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-sendmail",
3
- "version": "0.41.4",
3
+ "version": "0.43.2",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"