@yozz.app/imap 0.1.4 → 0.1.5

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/README.md CHANGED
@@ -36,3 +36,9 @@ Or for a specific host with authentication:
36
36
  ```bash
37
37
  YOZZ_IMAP_HOST=imap.example.com YOZZ_IMAP_USER=me@example.com YOZZ_IMAP_PASSWORD=secret pnpm -F @yozz.app/imap live imap.example.com
38
38
  ```
39
+
40
+ A literal over 64 MiB (`DEFAULT_MAX_LITERAL_BYTES`, or `maxLiteralBytes` in the options) is a protocol failure.
41
+
42
+ `harness/relay-load.ts` pushes large messages through the hosted yozz.app relay, up over SMTP and
43
+ back down over IMAP, using a throwaway Forward Email alias and YOZZ account that it deletes. It is
44
+ for the maintainers; it needs `FORWARD_EMAIL_API_KEY` for the yozz.app domain.
package/dist/index.d.mts CHANGED
@@ -217,7 +217,7 @@ type ImapSelected = {
217
217
  };
218
218
  type ImapClientOptions = {
219
219
  readonly onUntagged?: (response: ImapUntagged) => void;
220
- /** Default 32 MiB; a larger literal is a protocol failure. */
220
+ /** Default 64 MiB; a larger literal is a protocol failure. */
221
221
  readonly maxLiteralBytes?: number;
222
222
  };
223
223
  type ImapIdle = {
package/dist/index.mjs CHANGED
@@ -1083,7 +1083,7 @@ const parseResponse = (tokens) => {
1083
1083
  };
1084
1084
  //#endregion
1085
1085
  //#region src/tokenizer.ts
1086
- const DEFAULT_MAX_LITERAL_BYTES = 33554432;
1086
+ const DEFAULT_MAX_LITERAL_BYTES = 67108864;
1087
1087
  const MAX_UINT32 = 4294967295;
1088
1088
  const checkBareLf = (bytes, start, end) => {
1089
1089
  for (let i = start; i < end; i++) if (bytes[i] === 10 && (i === 0 || bytes[i - 1] !== 13)) return {
@@ -1484,7 +1484,7 @@ const summariesFrom = (untagged) => untagged.flatMap((item) => {
1484
1484
  }];
1485
1485
  });
1486
1486
  const createImapClient = (transport, options) => {
1487
- const maxLiteralBytes = options?.maxLiteralBytes ?? 33554432;
1487
+ const maxLiteralBytes = options?.maxLiteralBytes ?? 67108864;
1488
1488
  const onUntagged = options?.onUntagged;
1489
1489
  let chunks = [];
1490
1490
  let totalBufferedBytes = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozz.app/imap",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Transport-agnostic IMAP4rev2/rev1 client core: literals, total parsing, RFC 2047, SASL PLAIN/LOGIN, IDLE, UID MOVE, APPEND with APPENDUID, UID EXPUNGE.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fishballapp/yozz",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^24.13.4",
33
- "@yozz.app/smtp": "0.1.4",
34
- "@yozz.app/tls": "0.1.4",
35
- "@yozz.app/x509": "0.1.4",
33
+ "@yozz.app/smtp": "0.1.5",
34
+ "@yozz.app/tls": "0.1.5",
35
+ "@yozz.app/x509": "0.1.5",
36
36
  "tsdown": "^0.23.0"
37
37
  },
38
38
  "scripts": {