@n8n/imap 0.7.0 → 0.8.19

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.
Files changed (44) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +754 -0
  3. package/deps/encoding/encoding-indexes.js +73 -0
  4. package/deps/encoding/encoding.js +2340 -0
  5. package/deps/test/utf7-imap.js +48 -0
  6. package/deps/test/utf7-rfc2152.js +78 -0
  7. package/deps/utf7.js +104 -0
  8. package/index.d.ts +396 -0
  9. package/lib/Connection.js +2131 -0
  10. package/lib/Parser.js +1026 -0
  11. package/package.json +18 -41
  12. package/test/test-connection-fetch-dup.js +92 -0
  13. package/test/test-connection-fetch-frag.js +92 -0
  14. package/test/test-connection-fetch-spillover.js +176 -0
  15. package/test/test-connection-fetch-stringbody.js +104 -0
  16. package/test/test-connection-idle-normal.js +144 -0
  17. package/test/test-connection-idle-order.js +138 -0
  18. package/test/test-parse-bodystructure.js +83 -0
  19. package/test/test-parse-envelope-addrs.js +117 -0
  20. package/test/test-parse-expr.js +92 -0
  21. package/test/test-parse-header.js +109 -0
  22. package/test/test-parser.js +543 -0
  23. package/test/test.js +4 -0
  24. package/LICENSE.md +0 -86
  25. package/LICENSE_EE.md +0 -27
  26. package/dist/ImapSimple.d.ts +0 -16
  27. package/dist/ImapSimple.js +0 -120
  28. package/dist/ImapSimple.js.map +0 -1
  29. package/dist/PartData.d.ts +0 -24
  30. package/dist/PartData.js +0 -99
  31. package/dist/PartData.js.map +0 -1
  32. package/dist/build.tsbuildinfo +0 -1
  33. package/dist/errors.d.ts +0 -12
  34. package/dist/errors.js +0 -30
  35. package/dist/errors.js.map +0 -1
  36. package/dist/helpers/getMessage.d.ts +0 -3
  37. package/dist/helpers/getMessage.js +0 -37
  38. package/dist/helpers/getMessage.js.map +0 -1
  39. package/dist/index.d.ts +0 -7
  40. package/dist/index.js +0 -85
  41. package/dist/index.js.map +0 -1
  42. package/dist/types.d.ts +0 -30
  43. package/dist/types.js +0 -3
  44. package/dist/types.js.map +0 -1
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImapSimple = void 0;
4
- const events_1 = require("events");
5
- const getMessage_1 = require("./helpers/getMessage");
6
- const PartData_1 = require("./PartData");
7
- const IMAP_EVENTS = ['alert', 'mail', 'expunge', 'uidvalidity', 'update', 'close', 'end'];
8
- class ImapSimple extends events_1.EventEmitter {
9
- constructor(imap) {
10
- super();
11
- this.imap = imap;
12
- this.ending = false;
13
- IMAP_EVENTS.forEach((event) => {
14
- this.imap.on(event, this.emit.bind(this, event));
15
- });
16
- this.imap.on('error', (e) => {
17
- if (e && this.ending && e.code?.toUpperCase() === 'ECONNRESET') {
18
- return;
19
- }
20
- this.emit('error', e);
21
- });
22
- }
23
- end() {
24
- this.ending = true;
25
- this.imap.once('close', () => {
26
- this.ending = false;
27
- });
28
- this.imap.end();
29
- }
30
- async search(searchCriteria, fetchOptions) {
31
- return await new Promise((resolve, reject) => {
32
- this.imap.search(searchCriteria, (e, uids) => {
33
- if (e) {
34
- reject(e);
35
- return;
36
- }
37
- if (uids.length === 0) {
38
- resolve([]);
39
- return;
40
- }
41
- const fetch = this.imap.fetch(uids, fetchOptions);
42
- let messagesRetrieved = 0;
43
- const messages = [];
44
- const fetchOnMessage = async (message, seqNo) => {
45
- const msg = await (0, getMessage_1.getMessage)(message);
46
- msg.seqNo = seqNo;
47
- messages[seqNo] = msg;
48
- messagesRetrieved++;
49
- if (messagesRetrieved === uids.length) {
50
- resolve(messages.filter((m) => !!m));
51
- }
52
- };
53
- const fetchOnError = (error) => {
54
- fetch.removeListener('message', fetchOnMessage);
55
- fetch.removeListener('end', fetchOnEnd);
56
- reject(error);
57
- };
58
- const fetchOnEnd = () => {
59
- fetch.removeListener('message', fetchOnMessage);
60
- fetch.removeListener('error', fetchOnError);
61
- };
62
- fetch.on('message', fetchOnMessage);
63
- fetch.once('error', fetchOnError);
64
- fetch.once('end', fetchOnEnd);
65
- });
66
- });
67
- }
68
- async getPartData(message, part) {
69
- return await new Promise((resolve, reject) => {
70
- const fetch = this.imap.fetch(message.attributes.uid, {
71
- bodies: [part.partID],
72
- struct: true,
73
- });
74
- const fetchOnMessage = async (msg) => {
75
- const result = await (0, getMessage_1.getMessage)(msg);
76
- if (result.parts.length !== 1) {
77
- reject(new Error('Got ' + result.parts.length + ' parts, should get 1'));
78
- return;
79
- }
80
- const data = result.parts[0].body;
81
- const encoding = part.encoding.toUpperCase();
82
- resolve(PartData_1.PartData.fromData(data, encoding));
83
- };
84
- const fetchOnError = (error) => {
85
- fetch.removeListener('message', fetchOnMessage);
86
- fetch.removeListener('end', fetchOnEnd);
87
- reject(error);
88
- };
89
- const fetchOnEnd = () => {
90
- fetch.removeListener('message', fetchOnMessage);
91
- fetch.removeListener('error', fetchOnError);
92
- };
93
- fetch.once('message', fetchOnMessage);
94
- fetch.once('error', fetchOnError);
95
- fetch.once('end', fetchOnEnd);
96
- });
97
- }
98
- async addFlags(uid, flags) {
99
- return await new Promise((resolve, reject) => {
100
- this.imap.addFlags(uid, flags, (e) => (e ? reject(e) : resolve()));
101
- });
102
- }
103
- async getBoxes() {
104
- return await new Promise((resolve, reject) => {
105
- this.imap.getBoxes((e, boxes) => (e ? reject(e) : resolve(boxes)));
106
- });
107
- }
108
- async openBox(boxName) {
109
- return await new Promise((resolve, reject) => {
110
- this.imap.openBox(boxName, (e, result) => (e ? reject(e) : resolve(result)));
111
- });
112
- }
113
- async closeBox(autoExpunge = true) {
114
- return await new Promise((resolve, reject) => {
115
- this.imap.closeBox(autoExpunge, (e) => (e ? reject(e) : resolve()));
116
- });
117
- }
118
- }
119
- exports.ImapSimple = ImapSimple;
120
- //# sourceMappingURL=ImapSimple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImapSimple.js","sourceRoot":"","sources":["../src/ImapSimple.ts"],"names":[],"mappings":";;;AACA,mCAAsC;AAItC,qDAAkD;AAClD,yCAAsC;AAGtC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C;IACJ,CAAC;IAGD,KAAK,CAAC,OAAO,CAEZ,OAAe;QAEf,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACJ,CAAC;IAGD,KAAK,CAAC,QAAQ,CAEb,WAAW,GAAG,IAAI;QAElB,OAAO,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAzLD,gCAyLC"}
@@ -1,24 +0,0 @@
1
- export declare abstract class PartData {
2
- readonly buffer: Buffer;
3
- constructor(buffer: Buffer);
4
- toString(): string;
5
- static fromData(data: string, encoding: string, charset?: string): PartData;
6
- }
7
- export declare class Base64PartData extends PartData {
8
- constructor(data: string);
9
- }
10
- export declare class QuotedPrintablePartData extends PartData {
11
- constructor(data: string, charset?: string);
12
- }
13
- export declare class SevenBitPartData extends PartData {
14
- constructor(data: string);
15
- toString(): string;
16
- }
17
- export declare class BinaryPartData extends PartData {
18
- readonly charset: string;
19
- constructor(data: string, charset?: string);
20
- toString(): string;
21
- }
22
- export declare class UuencodedPartData extends PartData {
23
- constructor(data: string);
24
- }
package/dist/PartData.js DELETED
@@ -1,99 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.UuencodedPartData = exports.BinaryPartData = exports.SevenBitPartData = exports.QuotedPrintablePartData = exports.Base64PartData = exports.PartData = void 0;
27
- const iconvlite = __importStar(require("iconv-lite"));
28
- const qp = __importStar(require("quoted-printable"));
29
- const utf8 = __importStar(require("utf8"));
30
- const uuencode = __importStar(require("uuencode"));
31
- class PartData {
32
- constructor(buffer) {
33
- this.buffer = buffer;
34
- }
35
- toString() {
36
- return this.buffer.toString();
37
- }
38
- static fromData(data, encoding, charset) {
39
- if (encoding === 'BASE64') {
40
- return new Base64PartData(data);
41
- }
42
- if (encoding === 'QUOTED-PRINTABLE') {
43
- return new QuotedPrintablePartData(data, charset);
44
- }
45
- if (encoding === '7BIT') {
46
- return new SevenBitPartData(data);
47
- }
48
- if (encoding === '8BIT' || encoding === 'BINARY') {
49
- return new BinaryPartData(data, charset);
50
- }
51
- if (encoding === 'UUENCODE') {
52
- return new UuencodedPartData(data);
53
- }
54
- throw new Error('Unknown encoding ' + encoding);
55
- }
56
- }
57
- exports.PartData = PartData;
58
- class Base64PartData extends PartData {
59
- constructor(data) {
60
- super(Buffer.from(data, 'base64'));
61
- }
62
- }
63
- exports.Base64PartData = Base64PartData;
64
- class QuotedPrintablePartData extends PartData {
65
- constructor(data, charset) {
66
- const decoded = charset?.toUpperCase() === 'UTF-8' ? utf8.decode(qp.decode(data)) : qp.decode(data);
67
- super(Buffer.from(decoded));
68
- }
69
- }
70
- exports.QuotedPrintablePartData = QuotedPrintablePartData;
71
- class SevenBitPartData extends PartData {
72
- constructor(data) {
73
- super(Buffer.from(data));
74
- }
75
- toString() {
76
- return this.buffer.toString('ascii');
77
- }
78
- }
79
- exports.SevenBitPartData = SevenBitPartData;
80
- class BinaryPartData extends PartData {
81
- constructor(data, charset = 'utf-8') {
82
- super(Buffer.from(data));
83
- this.charset = charset;
84
- }
85
- toString() {
86
- return iconvlite.decode(this.buffer, this.charset);
87
- }
88
- }
89
- exports.BinaryPartData = BinaryPartData;
90
- class UuencodedPartData extends PartData {
91
- constructor(data) {
92
- const parts = data.split('\n');
93
- const merged = parts.splice(1, parts.length - 4).join('');
94
- const decoded = uuencode.decode(merged);
95
- super(decoded);
96
- }
97
- }
98
- exports.UuencodedPartData = UuencodedPartData;
99
- //# sourceMappingURL=PartData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PartData.js","sourceRoot":"","sources":["../src/PartData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sDAAwC;AACxC,qDAAuC;AACvC,2CAA6B;AAC7B,mDAAqC;AAErC,MAAsB,QAAQ;IAC7B,YAAqB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEvC,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,QAAgB,EAAE,OAAgB;QAC/D,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC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,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;CACD;AARD,4CAQC;AAED,MAAa,cAAe,SAAQ,QAAQ;IAC3C,YACC,IAAY,EACH,UAAkB,OAAO;QAElC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAFhB,YAAO,GAAP,OAAO,CAAkB;IAGnC,CAAC;IAED,QAAQ;QACP,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;CACD;AAXD,wCAWC;AAED,MAAa,iBAAkB,SAAQ,QAAQ;IAC9C,YAAY,IAAY;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC;CACD;AAPD,8CAOC"}
@@ -1 +0,0 @@
1
- {"fileNames":["../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.6.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/jest-expect-message/types/index.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/assert.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/buffer.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/child_process.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/cluster.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/console.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/constants.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/crypto.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dgram.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dns.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/domain.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/dom-events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/fs.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/http.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/http2.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/https.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/inspector.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/module.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/net.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/os.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/path.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/process.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/punycode.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/querystring.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/readline.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/repl.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/stream/web.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/test.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/timers.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/tls.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/trace_events.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/tty.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/url.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/util.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/v8.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/vm.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/wasi.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/zlib.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/globals.global.d.ts","../../../../node_modules/.pnpm/@types+node@18.16.16/node_modules/@types/node/index.d.ts","../../../../node_modules/.pnpm/@types+imap@0.8.40/node_modules/@types/imap/index.d.ts","../src/types.ts","../src/helpers/getMessage.ts","../../../../node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts","../../../../node_modules/.pnpm/@types+quoted-printable@1.0.2/node_modules/@types/quoted-printable/index.d.ts","../../../../node_modules/.pnpm/@types+utf8@3.0.3/node_modules/@types/utf8/index.d.ts","../../../../node_modules/.pnpm/@types+uuencode@0.0.3_patch_hash=3i7wecddkama6vhpu5o37g24u4/node_modules/@types/uuencode/index.d.ts","../src/PartData.ts","../src/ImapSimple.ts","../src/errors.ts","../src/index.ts"],"fileIdsList":[[70,96,100,107],[54,100],[57,100],[58,63,91,100],[59,70,71,78,88,99,100],[59,60,70,78,100],[61,100],[62,63,71,79,100],[63,88,96,100],[64,66,70,78,100],[65,100],[66,67,100],[70,100],[68,70,100],[70,71,72,88,99,100],[70,71,72,85,88,91,100],[100,104],[100],[66,70,73,78,88,99,100],[70,71,73,74,78,88,96,99,100],[73,75,88,96,99,100],[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],[70,76,100],[77,99,100],[66,70,78,88,100],[79,100],[80,100],[57,81,100],[82,98,100,104],[83,100],[84,100],[70,85,86,100],[85,87,100,102],[58,70,88,89,90,91,100],[58,88,90,100],[88,89,100],[91,100],[92,100],[70,94,95,100],[94,95,100],[63,78,88,96,100],[97,100],[78,98,100],[58,73,84,99,100],[63,100],[88,100,101],[100,102],[100,103],[58,63,70,72,81,88,99,100,102,104],[88,100,105],[100,107],[70,100,108,109,110,115],[100,111,112,113,114],[100,108,109],[100,108,109,116,117],[100,108]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3d7b04b45033f57351c8434f60b6be1ea71a2dfec2d0a0c3c83badbb0e3e693","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"406a5a771d97867cba07e7fbd3cd1fb2dd1004558b973733205737e9dd7ed929","affectsGlobalScope":true,"impliedFormat":1},{"version":"ba8691cf6bea9d53e6bf6cbc22af964a9633a21793981a1be3dce65e7a714d8b","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3","impliedFormat":1},{"version":"c7a976828c7acb8ada184935195aef0f389c4e37d87daa52eb4f2f3df3edcdea","affectsGlobalScope":true,"impliedFormat":1},{"version":"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"b787b5b54349a24f07d089b612a9fb8ff024dbbe991ff52ea2b188a6b1230644","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","impliedFormat":1},{"version":"4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true,"impliedFormat":1},{"version":"7abd2623cdd8148233c0c6b9da0289e124f1718bc58dcb8da4262432e9ce0f0a","impliedFormat":1},{"version":"f4a3088770ba56a4c72e9907bc9798706ab1575097cd024503f57966df2d3d3a","impliedFormat":1},{"version":"7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","impliedFormat":1},{"version":"a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","impliedFormat":1},{"version":"7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"5629c03c44d1e07698c31d04318c9950d78940461269c0f692a42091cedea142","impliedFormat":1},{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"c6b124041039647ff446e19ea0e90a7a83256593d64f23c66b4fda6e0c5b968e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a9fc1469744055a3435f203123246b96c094e7ff8c4e1c3863829d9b705b7a34","affectsGlobalScope":true,"impliedFormat":1},{"version":"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","impliedFormat":1},{"version":"0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","impliedFormat":1},{"version":"52e0d4a8762141a86861c8175312030724ff444f7ae548c61e7263f774160fc3","impliedFormat":1},{"version":"6ce4e2aba197a5cd6fcd6e710e1827b5daeeba19388334615abd69026bfa3194","signature":"edc009b8da0b4f21086e5a665072b6ca2ddeefaf342596863cfbbdd285a1229d"},{"version":"dd94e97cdbb6241a2b70533341e1da83bfb80d56f70e2aab4b10aeedfc201ccc","signature":"d3470035d665d3be9ac5441942bac95ba52ca1b9f3eab4559fcd6dd616827354"},{"version":"85d3aa95b0086752d2f7784d2bdaeb38f99c3cf6c35bee861702beb68556cb9e","impliedFormat":1},{"version":"9c0ea4ed2c2cd25374c31d9bbbe8aefa5171da25ee6e7d388b6ae9c3481bda3f","impliedFormat":1},{"version":"67dde413b255aee29f821a7a98218f5936539c38526d77dfede51f12f2c3aa52","impliedFormat":1},{"version":"df7cad075a5e421ae12ea4674692b295346744ba1fff73850056c904f321083c","impliedFormat":1},{"version":"cb3514c987995ea0522c1c8182dee0fc947cecd1f459fc9c6322375aecc86e25","signature":"389ada30404735d61de19071551243ecffbcea2d0011cb37425999dee904cee0"},{"version":"477e57ce9ca613e7754bd16b2f1627e02cb976f2c3f44a9d1c5132bdc41c1dda","signature":"7beb36ccd089f703655d747912b5dec2777c51161ca8cfd45de78397667eaef6"},{"version":"61e7f1bd24f78842bb050f00db1f52283488794f1442a98e104089ae0ff7ad04","signature":"3cc448750f6b14e1bb8be179e843b345b1eb7812d4942b7c6f25c3ed9f9b7020"},{"version":"dbd6f149ee201984927968742c0318ff036388395723d60fc43560ce83da436c","signature":"ac756991c52b52aa00cbb21174b4551c18abf820ad0f944a33d4e9e92d701c7b"}],"root":[53,109,110,[115,118]],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"module":1,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"target":8,"tsBuildInfoFile":"./build.tsbuildinfo","useUnknownInCatchVariables":true},"referencedMap":[[108,1],[54,2],[55,2],[57,3],[58,4],[59,5],[60,6],[61,7],[62,8],[63,9],[64,10],[65,11],[66,12],[67,12],[69,13],[68,14],[70,13],[71,15],[72,16],[56,17],[106,18],[73,19],[74,20],[75,21],[107,22],[76,23],[77,24],[78,25],[79,26],[80,27],[81,28],[82,29],[83,30],[84,31],[85,32],[86,32],[87,33],[88,34],[90,35],[89,36],[91,37],[92,38],[93,18],[94,39],[95,40],[96,41],[97,42],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,49],[105,50],[112,18],[113,18],[114,51],[111,18],[51,18],[52,18],[9,18],[11,18],[10,18],[2,18],[12,18],[13,18],[14,18],[15,18],[16,18],[17,18],[18,18],[19,18],[3,18],[20,18],[4,18],[21,18],[25,18],[22,18],[23,18],[24,18],[26,18],[27,18],[28,18],[5,18],[29,18],[30,18],[31,18],[32,18],[6,18],[36,18],[33,18],[34,18],[35,18],[37,18],[7,18],[38,18],[43,18],[44,18],[39,18],[40,18],[41,18],[42,18],[8,18],[48,18],[45,18],[46,18],[47,18],[49,18],[1,18],[50,18],[53,18],[116,52],[115,53],[117,18],[110,54],[118,55],[109,56]],"latestChangedDtsFile":"./index.d.ts","version":"5.6.2"}
package/dist/errors.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export declare abstract class ImapError extends Error {
2
- }
3
- export declare class ConnectionTimeoutError extends ImapError {
4
- readonly timeout?: number | undefined;
5
- constructor(timeout?: number | undefined);
6
- }
7
- export declare class ConnectionClosedError extends ImapError {
8
- constructor();
9
- }
10
- export declare class ConnectionEndedError extends ImapError {
11
- constructor();
12
- }
package/dist/errors.js DELETED
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConnectionEndedError = exports.ConnectionClosedError = exports.ConnectionTimeoutError = exports.ImapError = void 0;
4
- class ImapError extends Error {
5
- }
6
- exports.ImapError = ImapError;
7
- class ConnectionTimeoutError extends ImapError {
8
- constructor(timeout) {
9
- let message = 'connection timed out';
10
- if (timeout) {
11
- message += `. timeout = ${timeout} ms`;
12
- }
13
- super(message);
14
- this.timeout = timeout;
15
- }
16
- }
17
- exports.ConnectionTimeoutError = ConnectionTimeoutError;
18
- class ConnectionClosedError extends ImapError {
19
- constructor() {
20
- super('Connection closed unexpectedly');
21
- }
22
- }
23
- exports.ConnectionClosedError = ConnectionClosedError;
24
- class ConnectionEndedError extends ImapError {
25
- constructor() {
26
- super('Connection ended unexpectedly');
27
- }
28
- }
29
- exports.ConnectionEndedError = ConnectionEndedError;
30
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAsB,SAAU,SAAQ,KAAK;CAAG;AAAhD,8BAAgD;AAGhD,MAAa,sBAAuB,SAAQ,SAAS;IACpD,YAEU,OAAgB;QAEzB,IAAI,OAAO,GAAG,sBAAsB,CAAC;QACrC,IAAI,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,eAAe,OAAO,KAAK,CAAC;QACxC,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,CAAC;QANN,YAAO,GAAP,OAAO,CAAS;IAO1B,CAAC;CACD;AAXD,wDAWC;AAED,MAAa,qBAAsB,SAAQ,SAAS;IACnD;QACC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACzC,CAAC;CACD;AAJD,sDAIC;AAED,MAAa,oBAAqB,SAAQ,SAAS;IAClD;QACC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACxC,CAAC;CACD;AAJD,oDAIC"}
@@ -1,3 +0,0 @@
1
- import { type ImapMessage } from 'imap';
2
- import type { Message } from '../types';
3
- export declare function getMessage(message: ImapMessage): Promise<Message>;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMessage = getMessage;
4
- const imap_1 = require("imap");
5
- async function getMessage(message) {
6
- return await new Promise((resolve) => {
7
- let attributes;
8
- const parts = [];
9
- const messageOnBody = (stream, info) => {
10
- let body = '';
11
- const streamOnData = (chunk) => {
12
- body += chunk.toString('utf8');
13
- };
14
- stream.on('data', streamOnData);
15
- stream.once('end', () => {
16
- stream.removeListener('data', streamOnData);
17
- parts.push({
18
- which: info.which,
19
- size: info.size,
20
- body: /^HEADER/g.test(info.which) ? (0, imap_1.parseHeader)(body) : body,
21
- });
22
- });
23
- };
24
- const messageOnAttributes = (attrs) => {
25
- attributes = attrs;
26
- };
27
- const messageOnEnd = () => {
28
- message.removeListener('body', messageOnBody);
29
- message.removeListener('attributes', messageOnAttributes);
30
- resolve({ attributes, parts });
31
- };
32
- message.on('body', messageOnBody);
33
- message.once('attributes', messageOnAttributes);
34
- message.once('end', messageOnEnd);
35
- });
36
- }
37
- //# sourceMappingURL=getMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getMessage.js","sourceRoot":"","sources":["../../src/helpers/getMessage.ts"],"names":[],"mappings":";;AAYA,gCAyCC;AArDD,+BAKc;AAOP,KAAK,UAAU,UAAU,CAE/B,OAAoB;IAEpB,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,IAAI,UAAiC,CAAC;QACtC,MAAM,K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AAK,EAAE,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { ImapSimple } from './ImapSimple';
2
- import type { ImapSimpleOptions, MessagePart } from './types';
3
- export declare function connect(options: ImapSimpleOptions): Promise<ImapSimple>;
4
- export declare function getParts(struct: any, parts?: MessagePart[]): MessagePart[];
5
- export * from './ImapSimple';
6
- export * from './errors';
7
- export * from './types';
package/dist/index.js DELETED
@@ -1,85 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.connect = connect;
21
- exports.getParts = getParts;
22
- const imap_1 = __importDefault(require("imap"));
23
- const errors_1 = require("./errors");
24
- const ImapSimple_1 = require("./ImapSimple");
25
- async function connect(options) {
26
- const authTimeout = options.imap.authTimeout ?? 2000;
27
- options.imap.authTimeout = authTimeout;
28
- const imap = new imap_1.default(options.imap);
29
- return await new Promise((resolve, reject) => {
30
- const cleanUp = () => {
31
- imap.removeListener('ready', imapOnReady);
32
- imap.removeListener('error', imapOnError);
33
- imap.removeListener('close', imapOnClose);
34
- imap.removeListener('end', imapOnEnd);
35
- };
36
- const imapOnReady = () => {
37
- cleanUp();
38
- resolve(new ImapSimple_1.ImapSimple(imap));
39
- };
40
- const imapOnError = (e) => {
41
- if (e.source === 'timeout-auth') {
42
- e = new errors_1.ConnectionTimeoutError(authTimeout);
43
- }
44
- cleanUp();
45
- reject(e);
46
- };
47
- const imapOnEnd = () => {
48
- cleanUp();
49
- reject(new errors_1.ConnectionEndedError());
50
- };
51
- const imapOnClose = () => {
52
- cleanUp();
53
- reject(new errors_1.ConnectionClosedError());
54
- };
55
- imap.once('ready', imapOnReady);
56
- imap.once('error', imapOnError);
57
- imap.once('close', imapOnClose);
58
- imap.once('end', imapOnEnd);
59
- if (options.onMail) {
60
- imap.on('mail', options.onMail);
61
- }
62
- if (options.onExpunge) {
63
- imap.on('expunge', options.onExpunge);
64
- }
65
- if (options.onUpdate) {
66
- imap.on('update', options.onUpdate);
67
- }
68
- imap.connect();
69
- });
70
- }
71
- function getParts(struct, parts = []) {
72
- for (let i = 0; i < struct.length; i++) {
73
- if (Array.isArray(struct[i])) {
74
- getParts(struct[i], parts);
75
- }
76
- else if (struct[i].partID) {
77
- parts.push(struct[i]);
78
- }
79
- }
80
- return parts;
81
- }
82
- __exportStar(require("./ImapSimple"), exports);
83
- __exportStar(require("./errors"), exports);
84
- __exportStar(require("./types"), exports);
85
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,0BAyDC;AAYD,4BAeC;AA7FD,gDAAwB;AAExB,qCAA+F;AAC/F,6CAA0C;AAMnC,KAAK,UAAU,OAAO,CAAC,OAA0B;IACvD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAEvC,MAAM,IAAI,GAAG,IAAI,cAAI,CAAC,OAAO,CAAC,IAAI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,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAE5B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;YACvB,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACJ,CAAC;AAYD,SAAgB,QAAQ,CAGvB,MAAW,EAEX,QAAuB,EAAE;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9B,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC5B,CAAC;aAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAgB,CAAC,CAAC;QACtC,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,+CAA6B;AAC7B,2CAAyB;AACzB,0CAAwB"}
package/dist/types.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import type { Config, ImapMessageBodyInfo, ImapMessageAttributes } from 'imap';
2
- export interface ImapSimpleOptions {
3
- imap: Config;
4
- onMail?: ((numNewMail: number) => void) | undefined;
5
- onExpunge?: ((seqNo: number) => void) | undefined;
6
- onUpdate?: ((seqNo: number, info: {
7
- num: number | undefined;
8
- text: unknown;
9
- }) => void) | undefined;
10
- }
11
- export interface MessagePart {
12
- partID: string;
13
- encoding: 'BASE64' | 'QUOTED-PRINTABLE' | '7BIT' | '8BIT' | 'BINARY' | 'UUENCODE';
14
- type: 'TEXT';
15
- subtype: string;
16
- params?: {
17
- charset?: string;
18
- };
19
- disposition?: {
20
- type: string;
21
- };
22
- }
23
- export interface MessageBodyPart extends ImapMessageBodyInfo {
24
- body: string | object;
25
- }
26
- export interface Message {
27
- attributes: ImapMessageAttributes;
28
- parts: MessageBodyPart[];
29
- seqNo?: number;
30
- }
package/dist/types.js DELETED
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}