@upyo/jmap 0.6.0-dev.327 → 0.6.0-dev.338
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 +11 -2
- package/dist/index.js +11 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
24
|
const __upyo_core = __toESM(require("@upyo/core"));
|
|
25
|
+
const __upyo_core_calendar = __toESM(require("@upyo/core/calendar"));
|
|
25
26
|
const __upyo_core_message_id = __toESM(require("@upyo/core/message-id"));
|
|
26
27
|
|
|
27
28
|
//#region src/errors.ts
|
|
@@ -351,20 +352,28 @@ function extractCustomHeaders(message) {
|
|
|
351
352
|
function buildBodyStructure(message, uploadedBlobs) {
|
|
352
353
|
const bodyValues = {};
|
|
353
354
|
const parts = [];
|
|
354
|
-
if ("text" in message.content && message.content.text) {
|
|
355
|
+
if ("text" in message.content && message.content.text !== void 0) {
|
|
355
356
|
bodyValues["text"] = { value: message.content.text };
|
|
356
357
|
parts.push({
|
|
357
358
|
partId: "text",
|
|
358
359
|
type: "text/plain; charset=utf-8"
|
|
359
360
|
});
|
|
360
361
|
}
|
|
361
|
-
if ("html" in message.content
|
|
362
|
+
if ("html" in message.content) {
|
|
362
363
|
bodyValues["html"] = { value: message.content.html };
|
|
363
364
|
parts.push({
|
|
364
365
|
partId: "html",
|
|
365
366
|
type: "text/html; charset=utf-8"
|
|
366
367
|
});
|
|
367
368
|
}
|
|
369
|
+
if (message.calendar != null) {
|
|
370
|
+
const calendar = (0, __upyo_core_calendar.resolveCalendarContent)(message.calendar);
|
|
371
|
+
bodyValues["calendar"] = { value: calendar.content };
|
|
372
|
+
parts.push({
|
|
373
|
+
partId: "calendar",
|
|
374
|
+
type: `text/calendar; method=${calendar.method}`
|
|
375
|
+
});
|
|
376
|
+
}
|
|
368
377
|
let contentPart;
|
|
369
378
|
if (parts.length === 1) contentPart = parts[0];
|
|
370
379
|
else if (parts.length > 1) contentPart = {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { combineSignals, createFailedReceipt, parseRetryAfter, readAttachmentContent } from "@upyo/core";
|
|
2
|
+
import { resolveCalendarContent } from "@upyo/core/calendar";
|
|
2
3
|
import { parseMessageId } from "@upyo/core/message-id";
|
|
3
4
|
|
|
4
5
|
//#region src/errors.ts
|
|
@@ -328,20 +329,28 @@ function extractCustomHeaders(message) {
|
|
|
328
329
|
function buildBodyStructure(message, uploadedBlobs) {
|
|
329
330
|
const bodyValues = {};
|
|
330
331
|
const parts = [];
|
|
331
|
-
if ("text" in message.content && message.content.text) {
|
|
332
|
+
if ("text" in message.content && message.content.text !== void 0) {
|
|
332
333
|
bodyValues["text"] = { value: message.content.text };
|
|
333
334
|
parts.push({
|
|
334
335
|
partId: "text",
|
|
335
336
|
type: "text/plain; charset=utf-8"
|
|
336
337
|
});
|
|
337
338
|
}
|
|
338
|
-
if ("html" in message.content
|
|
339
|
+
if ("html" in message.content) {
|
|
339
340
|
bodyValues["html"] = { value: message.content.html };
|
|
340
341
|
parts.push({
|
|
341
342
|
partId: "html",
|
|
342
343
|
type: "text/html; charset=utf-8"
|
|
343
344
|
});
|
|
344
345
|
}
|
|
346
|
+
if (message.calendar != null) {
|
|
347
|
+
const calendar = resolveCalendarContent(message.calendar);
|
|
348
|
+
bodyValues["calendar"] = { value: calendar.content };
|
|
349
|
+
parts.push({
|
|
350
|
+
partId: "calendar",
|
|
351
|
+
type: `text/calendar; method=${calendar.method}`
|
|
352
|
+
});
|
|
353
|
+
}
|
|
345
354
|
let contentPart;
|
|
346
355
|
if (parts.length === 1) contentPart = parts[0];
|
|
347
356
|
else if (parts.length > 1) contentPart = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upyo/jmap",
|
|
3
|
-
"version": "0.6.0-dev.
|
|
3
|
+
"version": "0.6.0-dev.338",
|
|
4
4
|
"description": "JMAP 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.338+cae9af76"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"jmap-rfc-types": "^0.1.2",
|