emailjs-mime-builder
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -459,5 +459,4 @@ 'use strict'; | ||
if (flowed) { | ||
lines.push((0, _emailjsMimeCodec.foldLines)(this.content.replace(/\r?\n/g, '\r\n') | ||
// space stuffing http://tools.ietf.org/html/rfc3676#section-4.2 | ||
.replace(/^( |From|>)/igm, ' $1'), 76, true)); | ||
lines.push((0, _emailjsMimeCodec.foldLines)(this.content.replace(/\r?\n/g, '\r\n').replace(/^( |From|>)/igm, ' $1'), 76, true)); | ||
} else { | ||
@@ -540,2 +539,2 @@ lines.push(this.content.replace(/\r?\n/g, '\r\n')); | ||
exports.default = MimeNode; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9idWlsZGVyLmpzIl0sIm5hbWVzIjpbIk1pbWVOb2RlIiwiY29udGVudFR5cGUiLCJvcHRpb25zIiwibm9kZUNvdW50ZXIiLCJiYXNlQm91bmRhcnkiLCJEYXRlIiwibm93IiwidG9TdHJpbmciLCJNYXRoIiwicmFuZG9tIiwiZGF0ZSIsInJvb3ROb2RlIiwiZmlsZW5hbWUiLCJzcGxpdCIsInBvcCIsInBhcmVudE5vZGUiLCJfbm9kZUlkIiwiX2NoaWxkTm9kZXMiLCJfaGVhZGVycyIsInNldEhlYWRlciIsImluY2x1ZGVCY2NJbkhlYWRlciIsIm5vZGUiLCJhcHBlbmRDaGlsZCIsImNoaWxkTm9kZSIsInB1c2giLCJmb3JFYWNoIiwiaSIsInVuZGVmaW5lZCIsImxlbmd0aCIsInNwbGljZSIsImtleSIsInZhbHVlIiwiYWRkZWQiLCJBcnJheSIsImlzQXJyYXkiLCJPYmplY3QiLCJrZXlzIiwiaGVhZGVyVmFsdWUiLCJsZW4iLCJhZGRIZWFkZXIiLCJjb250ZW50IiwibGluZXMiLCJnZXRIZWFkZXIiLCJ0b0xvd2VyQ2FzZSIsInRyaW0iLCJ0cmFuc2ZlckVuY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SB0aGlzOlxuICAgICAgICAgIC8vIFwiMTQwMTM5MTkwNTU5MC01OGFhOGMzMi1kMzJhMDY1Yy1jMWEyYWFkMlwiXG4gICAgICAgICAgWzAsIDAsIDBdLnJlZHVjZShmdW5jdGlvbiAocHJldikge1xuICAgICAgICAgICAgcmV0dXJuIHByZXYgKyAnLScgKyBNYXRoLmZsb29yKCgxICsgTWF0aC5yYW5kb20oKSkgKiAweDEwMDAwMDAwMClcbiAgICAgICAgICAgICAgLnRvU3RyaW5nKDE2KVxuICAgICAgICAgICAgICAuc3Vic3RyaW5nKDEpXG4gICAgICAgICAgfSwgRGF0ZS5ub3coKSkgK1xuICAgICAgICAgICdAJyArXG4gICAgICAgICAgLy8gdHJ5IHRvIHVzZSB0aGUgZG9tYWluIG9mIHRoZSBGUk9NIGFkZHJlc3Mgb3IgZmFsbGJhY2sgbG9jYWxob3N0XG4gICAgICAgICAgKHRoaXMuZ2V0RW52ZWxvcGUoKS5mcm9tIHx8ICdsb2NhbGhvc3QnKS5zcGxpdCgnQCcpLnBvcCgpICtcbiAgICAgICAgICAnPicpXG4gICAgICB9XG4gICAgICBpZiAoIXRoaXMuZ2V0SGVhZGVyKCdNSU1FLVZlcnNpb24nKSkge1xuICAgICAgICBsaW5lcy5wdXNoKCdNSU1FLVZlcnNpb246IDEuMCcpXG4gICAgICB9XG4gICAgfVxuICAgIGxpbmVzLnB1c2goJycpXG5cbiAgICBpZiAodGhpcy5jb250ZW50KSB7XG4gICAgICBzd2l0Y2ggKHRyYW5zZmVyRW5jb2RpbmcpIHtcbiAgICAgICAgY2FzZSAncXVvdGVkLXByaW50YWJsZSc6XG4gICAgICAgICAgbGluZXMucHVzaChxdW90ZWRQcmludGFibGVFbmNvZGUodGhpcy5jb250ZW50KSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdiYXNlNjQnOlxuICAgICAgICAgIGxpbmVzLnB1c2goYmFzZTY0RW5jb2RlKHRoaXMuY29udGVudCwgdHlwZW9mIHRo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3QnKS5zcGxpdCgnQCcpLnBvcCgpICtcbiAgICAgICAgICAnPicpXG4gICAgICB9XG4gICAgICBpZiAoIXRoaXMuZ2V0SGVhZGVyKCdNSU1FLVZlcnNpb24nKSkge1xuICAgICAgICBsaW5lcy5wdXNoKCdNSU1FLVZlcnNpb246IDEuMCcpXG4gICAgICB9XG4gICAgfVxuICAgIGxpbmVzLnB1c2goJycpXG5cbiAgICBpZiAodGhpcy5jb250ZW50KSB7XG4gICAgICBzd2l0Y2ggKHRyYW5zZmVyRW5jb2RpbmcpIHtcbiAgICAgICAgY2FzZSAncXVvdGVkLXByaW50YWJsZSc6XG4gICAgICAgICAgbGluZXMucHVzaChxdW90ZWRQcmludGFibGVFbmNvZGUodGhpcy5jb250ZW50KSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlICdiYXNlNjQnOlxuICAgICAgICAgIGxpbmVzLnB1c2goYmFzZTY0RW5jb2RlKHRoaXMuY29udGVudCwgdHlwZW9mIHRoaXMuY29udGVudCA9PT0gJ29iamVjdCcgPyAnYmluYXJ5JyA6IHVuZGVmaW5lZCkpXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICBpZiAoZmxvd2VkKSB7XG4gICAgICAgICAgICAvLyBzcGFjZSBzdHVmZmluZyBodHRwOi8vdG9vbHMuaWV0Zi5vcmcvaHRtbC9yZmMzNjc2I3NlY3Rpb24tNC4yXG4gICAgICAgICAgICBsaW5lcy5wdXNoKGZvbGRMaW5lcyh0aGlzLmNvbnRlbnQucmVwbGFjZSgvXFxyP1xcbi9nLCAnXFxyXFxuJykucmVwbGFjZSgvXiggfEZyb218PikvaWdtLCAnICQxJyksIDc2LCB0cnVlKSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGluZXMucHVzaCh0aGlzLmNvbnRlbnQucmVwbGFjZSgvXFxyP1xcbi9nLCAnXFxyXFxuJykpXG4gICAgICAgICAgfVxuICAgICAgfVxuICA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gICAgIHRoaXMuYm91bmRhcnkgPSBzdHJ1Y3R1cmVkLnBhcmFtcy5ib3VuZGFyeSA9IHN0cnVjdHVyZWQucGFyYW1zLmJvdW5kYXJ5IHx8IHRoaXMuYm91bmRhcnkgfHwgZ2VuZXJhdGVCb3VuZGFyeSh0aGlzLl9ub2RlSWQsIHRoaXMucm9vdE5vZGUuYmFzZUJvdW5kYXJ5KVxuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmJvdW5kYXJ5ID0gZmFsc2VcbiAgICB9XG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "emailjs-mime-builder", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"homepage": "https://github.com/emailjs/emailjs-mime-builder", | ||
@@ -27,3 +27,3 @@ "description": "emailjs-mime-builder is a low level rfc2822 message composer. Define your own mime tree, no magic included.", | ||
"emailjs-mime-codec": "^2.0.5", | ||
"emailjs-mime-types": "^1.0.0", | ||
"emailjs-mime-types": "^2.0.0", | ||
"punycode": "^2.1.0", | ||
@@ -39,3 +39,3 @@ "ramda": "^0.25.0" | ||
"pre-commit": "^1.2.2", | ||
"standard": "^10.0.3" | ||
"standard": "^11.0.1" | ||
}, | ||
@@ -42,0 +42,0 @@ "standard": { |
@@ -412,6 +412,4 @@ import { | ||
if (flowed) { | ||
lines.push(foldLines(this.content.replace(/\r?\n/g, '\r\n') | ||
// space stuffing http://tools.ietf.org/html/rfc3676#section-4.2 | ||
.replace(/^( |From|>)/igm, ' $1'), | ||
76, true)) | ||
// space stuffing http://tools.ietf.org/html/rfc3676#section-4.2 | ||
lines.push(foldLines(this.content.replace(/\r?\n/g, '\r\n').replace(/^( |From|>)/igm, ' $1'), 76, true)) | ||
} else { | ||
@@ -418,0 +416,0 @@ lines.push(this.content.replace(/\r?\n/g, '\r\n')) |
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
129620
1941
+ Addedemailjs-mime-types@2.1.0(transitive)
- Removedemailjs-mime-types@1.0.0(transitive)
Updatedemailjs-mime-types@^2.0.0