@upyo/maileroo 0.6.0-dev.318 → 0.6.0-dev.319
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/dist/index.cjs +5 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -272,6 +272,7 @@ const STANDARD_HEADERS = new Set([
|
|
|
272
272
|
* @param config The resolved Maileroo configuration.
|
|
273
273
|
* @param signal Optional abort signal for cancellation.
|
|
274
274
|
* @returns JSON object ready for Maileroo API submission.
|
|
275
|
+
* @throws {TypeError} If the message carries an invalid message identifier.
|
|
275
276
|
* @throws {Error} If the caller aborts the operation.
|
|
276
277
|
* @since 0.6.0
|
|
277
278
|
*/
|
|
@@ -367,7 +368,10 @@ function convertHeaders(message) {
|
|
|
367
368
|
};
|
|
368
369
|
headers["X-Priority"] = priorityMap[message.priority];
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
+
const threading = (0, __upyo_core.resolveThreadingHeaders)(message);
|
|
372
|
+
const ownedHeaders = new Set([...threading.keys()].map((name) => name.toLowerCase()));
|
|
373
|
+
for (const [key, value] of message.headers.entries()) if (!isStandardHeader(key) && !ownedHeaders.has(key.toLowerCase())) headers[key] = value;
|
|
374
|
+
for (const [name, value] of threading) if (value != null) headers[name] = value;
|
|
371
375
|
return headers;
|
|
372
376
|
}
|
|
373
377
|
async function convertAttachment(attachment, signal) {
|
package/dist/index.d.cts
CHANGED
|
@@ -185,6 +185,7 @@ interface MailerooEmail {
|
|
|
185
185
|
* @param config The resolved Maileroo configuration.
|
|
186
186
|
* @param signal Optional abort signal for cancellation.
|
|
187
187
|
* @returns JSON object ready for Maileroo API submission.
|
|
188
|
+
* @throws {TypeError} If the message carries an invalid message identifier.
|
|
188
189
|
* @throws {Error} If the caller aborts the operation.
|
|
189
190
|
* @since 0.6.0
|
|
190
191
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ interface MailerooEmail {
|
|
|
185
185
|
* @param config The resolved Maileroo configuration.
|
|
186
186
|
* @param signal Optional abort signal for cancellation.
|
|
187
187
|
* @returns JSON object ready for Maileroo API submission.
|
|
188
|
+
* @throws {TypeError} If the message carries an invalid message identifier.
|
|
188
189
|
* @throws {Error} If the caller aborts the operation.
|
|
189
190
|
* @since 0.6.0
|
|
190
191
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { combineSignals, createFailedReceipt, parseRetryAfter, readAttachmentContent } from "@upyo/core";
|
|
1
|
+
import { combineSignals, createFailedReceipt, parseRetryAfter, readAttachmentContent, resolveThreadingHeaders } from "@upyo/core";
|
|
2
2
|
|
|
3
3
|
//#region src/config.ts
|
|
4
4
|
/**
|
|
@@ -249,6 +249,7 @@ const STANDARD_HEADERS = new Set([
|
|
|
249
249
|
* @param config The resolved Maileroo configuration.
|
|
250
250
|
* @param signal Optional abort signal for cancellation.
|
|
251
251
|
* @returns JSON object ready for Maileroo API submission.
|
|
252
|
+
* @throws {TypeError} If the message carries an invalid message identifier.
|
|
252
253
|
* @throws {Error} If the caller aborts the operation.
|
|
253
254
|
* @since 0.6.0
|
|
254
255
|
*/
|
|
@@ -344,7 +345,10 @@ function convertHeaders(message) {
|
|
|
344
345
|
};
|
|
345
346
|
headers["X-Priority"] = priorityMap[message.priority];
|
|
346
347
|
}
|
|
347
|
-
|
|
348
|
+
const threading = resolveThreadingHeaders(message);
|
|
349
|
+
const ownedHeaders = new Set([...threading.keys()].map((name) => name.toLowerCase()));
|
|
350
|
+
for (const [key, value] of message.headers.entries()) if (!isStandardHeader(key) && !ownedHeaders.has(key.toLowerCase())) headers[key] = value;
|
|
351
|
+
for (const [name, value] of threading) if (value != null) headers[name] = value;
|
|
348
352
|
return headers;
|
|
349
353
|
}
|
|
350
354
|
async function convertAttachment(attachment, signal) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upyo/maileroo",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.319",
|
|
4
4
|
"description": "Maileroo 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.6.0-dev.
|
|
56
|
+
"@upyo/core": "0.6.0-dev.319+2324fa8c"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"tsdown": "^0.12.7",
|