@upyo/mailgun 0.2.1 → 0.2.2-dev.42
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/LICENSE +20 -0
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2025 Hong Minhee
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.cjs
CHANGED
|
@@ -211,7 +211,9 @@ function formatAddress(address) {
|
|
|
211
211
|
* @param attachment - The attachment to append
|
|
212
212
|
*/
|
|
213
213
|
async function appendAttachment(formData, attachment) {
|
|
214
|
-
const
|
|
214
|
+
const content = await attachment.content;
|
|
215
|
+
const buffer = content.buffer instanceof ArrayBuffer ? content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength) : content.slice();
|
|
216
|
+
const blob = new Blob([buffer], { type: attachment.contentType });
|
|
215
217
|
if (attachment.contentId) formData.append("inline", blob, attachment.filename);
|
|
216
218
|
else formData.append("attachment", blob, attachment.filename);
|
|
217
219
|
}
|
package/dist/index.js
CHANGED
|
@@ -210,7 +210,9 @@ function formatAddress(address) {
|
|
|
210
210
|
* @param attachment - The attachment to append
|
|
211
211
|
*/
|
|
212
212
|
async function appendAttachment(formData, attachment) {
|
|
213
|
-
const
|
|
213
|
+
const content = await attachment.content;
|
|
214
|
+
const buffer = content.buffer instanceof ArrayBuffer ? content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength) : content.slice();
|
|
215
|
+
const blob = new Blob([buffer], { type: attachment.contentType });
|
|
214
216
|
if (attachment.contentId) formData.append("inline", blob, attachment.filename);
|
|
215
217
|
else formData.append("attachment", blob, attachment.filename);
|
|
216
218
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upyo/mailgun",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2-dev.42+d516cdc2",
|
|
4
4
|
"description": "Mailgun transport for Upyo email library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@upyo/core": "0.2.
|
|
56
|
+
"@upyo/core": "0.2.2-dev.42+d516cdc2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@dotenvx/dotenvx": "^1.47.3",
|