@n8n/imap 0.6.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 -40
  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 -121
  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 -86
  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,121 +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
- var _a;
18
- if (e && this.ending && ((_a = e.code) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'ECONNRESET') {
19
- return;
20
- }
21
- this.emit('error', e);
22
- });
23
- }
24
- end() {
25
- this.ending = true;
26
- this.imap.once('close', () => {
27
- this.ending = false;
28
- });
29
- this.imap.end();
30
- }
31
- async search(searchCriteria, fetchOptions) {
32
- return await new Promise((resolve, reject) => {
33
- this.imap.search(searchCriteria, (e, uids) => {
34
- if (e) {
35
- reject(e);
36
- return;
37
- }
38
- if (uids.length === 0) {
39
- resolve([]);
40
- return;
41
- }
42
- const fetch = this.imap.fetch(uids, fetchOptions);
43
- let messagesRetrieved = 0;
44
- const messages = [];
45
- const fetchOnMessage = async (message, seqNo) => {
46
- const msg = await (0, getMessage_1.getMessage)(message);
47
- msg.seqNo = seqNo;
48
- messages[seqNo] = msg;
49
- messagesRetrieved++;
50
- if (messagesRetrieved === uids.length) {
51
- resolve(messages.filter((m) => !!m));
52
- }
53
- };
54
- const fetchOnError = (error) => {
55
- fetch.removeListener('message', fetchOnMessage);
56
- fetch.removeListener('end', fetchOnEnd);
57
- reject(error);
58
- };
59
- const fetchOnEnd = () => {
60
- fetch.removeListener('message', fetchOnMessage);
61
- fetch.removeListener('error', fetchOnError);
62
- };
63
- fetch.on('message', fetchOnMessage);
64
- fetch.once('error', fetchOnError);
65
- fetch.once('end', fetchOnEnd);
66
- });
67
- });
68
- }
69
- async getPartData(message, part) {
70
- return await new Promise((resolve, reject) => {
71
- const fetch = this.imap.fetch(message.attributes.uid, {
72
- bodies: [part.partID],
73
- struct: true,
74
- });
75
- const fetchOnMessage = async (msg) => {
76
- const result = await (0, getMessage_1.getMessage)(msg);
77
- if (result.parts.length !== 1) {
78
- reject(new Error('Got ' + result.parts.length + ' parts, should get 1'));
79
- return;
80
- }
81
- const data = result.parts[0].body;
82
- const encoding = part.encoding.toUpperCase();
83
- resolve(PartData_1.PartData.fromData(data, encoding));
84
- };
85
- const fetchOnError = (error) => {
86
- fetch.removeListener('message', fetchOnMessage);
87
- fetch.removeListener('end', fetchOnEnd);
88
- reject(error);
89
- };
90
- const fetchOnEnd = () => {
91
- fetch.removeListener('message', fetchOnMessage);
92
- fetch.removeListener('error', fetchOnError);
93
- };
94
- fetch.once('message', fetchOnMessage);
95
- fetch.once('error', fetchOnError);
96
- fetch.once('end', fetchOnEnd);
97
- });
98
- }
99
- async addFlags(uid, flags) {
100
- return await new Promise((resolve, reject) => {
101
- this.imap.addFlags(uid, flags, (e) => (e ? reject(e) : resolve()));
102
- });
103
- }
104
- async getBoxes() {
105
- return await new Promise((resolve, reject) => {
106
- this.imap.getBoxes((e, boxes) => (e ? reject(e) : resolve(boxes)));
107
- });
108
- }
109
- async openBox(boxName) {
110
- return await new Promise((resolve, reject) => {
111
- this.imap.openBox(boxName, (e, result) => (e ? reject(e) : resolve(result)));
112
- });
113
- }
114
- async closeBox(autoExpunge = true) {
115
- return await new Promise((resolve, reject) => {
116
- this.imap.closeBox(autoExpunge, (e) => (e ? reject(e) : resolve()));
117
- });
118
- }
119
- }
120
- exports.ImapSimple = ImapSimple;
121
- //# sourceMappingURL=ImapSimple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImapSimple.js","sourceRoot":"","sources":["../src/ImapSimple.ts"],"names":[],"mappings":";;;AACA,mCA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C,KAAK,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;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 qp = __importStar(require("quoted-printable"));
28
- const iconvlite = __importStar(require("iconv-lite"));
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 === null || charset === void 0 ? void 0 : 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,qDAAuC;AACvC,sDAAwC;AACxC,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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AC;IAC7B,CAAC;CACD;AAND,0DAMC;AAED,MAAa,gBAAiB,SAAQ,QAAQ;IAC7C,YAAY,IAAY;QACvB,KAAK,CAAC,MAAM,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
- {"program":{"fileNames":["../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.5.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/@types+quoted-printable@1.0.2/node_modules/@types/quoted-printable/index.d.ts","../../../../node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/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"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"ae37d6ccd1560b0203ab88d46987393adaaa78c919e51acf32fb82c86502e98c","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"406a5a771d97867cba07e7fbd3cd1fb2dd1004558b973733205737e9dd7ed929","affectsGlobalScope":true},"ba8691cf6bea9d53e6bf6cbc22af964a9633a21793981a1be3dce65e7a714d8b","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bce910d9164785c9f0d4dcea4be359f5f92130c7c7833dea6138ab1db310a1f9","affectsGlobalScope":true},"7d2e3fea24c712c99c03ad8f556abedbfe105f87f1be10b95dbd409d24bc05a3",{"version":"c7a976828c7acb8ada184935195aef0f389c4e37d87daa52eb4f2f3df3edcdea","affectsGlobalScope":true},"3719525a8f6ab731e3dfd585d9f87df55ec7d50d461df84f74eb4d68bb165244","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","b787b5b54349a24f07d089b612a9fb8ff024dbbe991ff52ea2b188a6b1230644","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","1cdcfc1f624d6c08aa12c73935f6e13f095919cd99edf95752951796eb225729","4eaff3d8e10676fd7913d8c108890e71c688e1e7d52f6d1d55c39514f493dc47","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"00dee7cdca8b8420c47ea4a31a34b8e8294013ebc4f463fd941e867e7bf05029","affectsGlobalScope":true},"7abd2623cdd8148233c0c6b9da0289e124f1718bc58dcb8da4262432e9ce0f0a","f4a3088770ba56a4c72e9907bc9798706ab1575097cd024503f57966df2d3d3a","7f138842074d0a40681775af008c8452093b68c383c94de31759e853c6d06b5c","a3d541d303ee505053f5dcbf9fafb65cac3d5631037501cd616195863a6c5740","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"0715e4cd28ad471b2a93f3e552ff51a3ae423417a01a10aa1d3bc7c6b95059d6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","4f3fdeba4e28e21aa719c081b8dc8f91d47e12e773389b9d35679c08151c9d37","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","5629c03c44d1e07698c31d04318c9950d78940461269c0f692a42091cedea142",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","1422cd9e705adcc09088fda85a900c2b70e3ad36ea85846f68bd1a884cdf4e2b","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"c6b124041039647ff446e19ea0e90a7a83256593d64f23c66b4fda6e0c5b968e","affectsGlobalScope":true},{"version":"a9fc1469744055a3435f203123246b96c094e7ff8c4e1c3863829d9b705b7a34","affectsGlobalScope":true},"868831cab82b65dfe1d68180e898af1f2101e89ba9b754d1db6fb8cc2fac1921","0fe8985a28f82c450a04a6edf1279d7181c0893f37da7d2a27f8efd4fd5edb03","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"52120bb7e4583612225bdf08e7c12559548170f11e660d33a33623bae9bbdbba","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a6dd3dba8e665ac43d279e0fdf5219edda0eed69b5e9a5061f46cd6a65c4f7a1","52e0d4a8762141a86861c8175312030724ff444f7ae548c61e7263f774160fc3",{"version":"6ce4e2aba197a5cd6fcd6e710e1827b5daeeba19388334615abd69026bfa3194","signature":"edc009b8da0b4f21086e5a665072b6ca2ddeefaf342596863cfbbdd285a1229d"},{"version":"baec7d38d9a576b1f2440b533f9d6e6974636becf756904d08b9a34a5c7526e7","signature":"d3470035d665d3be9ac5441942bac95ba52ca1b9f3eab4559fcd6dd616827354"},"9c0ea4ed2c2cd25374c31d9bbbe8aefa5171da25ee6e7d388b6ae9c3481bda3f","85d3aa95b0086752d2f7784d2bdaeb38f99c3cf6c35bee861702beb68556cb9e","67dde413b255aee29f821a7a98218f5936539c38526d77dfede51f12f2c3aa52","df7cad075a5e421ae12ea4674692b295346744ba1fff73850056c904f321083c",{"version":"40f6e32bbed054b8d34112435cfcc166958ab751f47f573520f2c11957253baf","signature":"389ada30404735d61de19071551243ecffbcea2d0011cb37425999dee904cee0"},{"version":"ff60bb8bb48247fbd39897f224891ddfe2046d760213bf3df185b7b4b41bf79b","signature":"eba476674d80a3c72e5d1e32fd2097869cbde1378d602db52de4dd9cf1fe0401"},{"version":"61e7f1bd24f78842bb050f00db1f52283488794f1442a98e104089ae0ff7ad04","signature":"3cc448750f6b14e1bb8be179e843b345b1eb7812d4942b7c6f25c3ed9f9b7020"},{"version":"2d664a8b34ad403c6468100ed82556f7f8f5af6968c21a368e059b2c1cec71f3","signature":"ac756991c52b52aa00cbb21174b4551c18abf820ad0f944a33d4e9e92d701c7b"}],"root":[47,103,104,[109,112]],"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":6,"tsBuildInfoFile":"./build.tsbuildinfo","useUnknownInCatchVariables":true},"fileIdsList":[[64,90,94,101],[48,94],[51,94],[52,57,85,94],[53,64,65,72,82,93,94],[53,54,64,72,94],[55,94],[56,57,65,73,94],[57,82,90,94],[58,60,64,72,94],[59,94],[60,61,94],[64,94],[62,64,94],[64,65,66,82,93,94],[64,65,66,79,82,85,94],[94,98],[94],[60,64,67,72,82,93,94],[64,65,67,68,72,82,90,93,94],[67,69,82,90,93,94],[48,49,50,51,52,53,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],[64,70,94],[71,93,94],[60,64,72,82,94],[73,94],[74,94],[51,75,94],[76,92,94,98],[77,94],[78,94],[64,79,80,94],[79,81,94,96],[52,64,82,83,84,85,94],[52,82,84,94],[82,83,94],[85,94],[86,94],[64,88,89,94],[88,89,94],[57,72,82,90,94],[91,94],[72,92,94],[52,67,78,93,94],[57,94],[82,94,95],[94,96],[94,97],[52,57,64,66,75,82,93,94,96,98],[82,94,99],[94,101],[64,94,102,103,104,109],[94,105,106,107,108],[94,102,103],[94,102,103,110,111],[94,102]],"referencedMap":[[102,1],[48,2],[49,2],[51,3],[52,4],[53,5],[54,6],[55,7],[56,8],[57,9],[58,10],[59,11],[60,12],[61,12],[63,13],[62,14],[64,13],[65,15],[66,16],[50,17],[100,18],[67,19],[68,20],[69,21],[101,22],[70,23],[71,24],[72,25],[73,26],[74,27],[75,28],[76,29],[77,30],[78,31],[79,32],[80,32],[81,33],[82,34],[84,35],[83,36],[85,37],[86,38],[87,18],[88,39],[89,40],[90,41],[91,42],[92,43],[93,44],[94,45],[95,46],[96,47],[97,48],[98,49],[99,50],[105,18],[107,18],[108,51],[106,18],[45,18],[46,18],[9,18],[8,18],[2,18],[10,18],[11,18],[12,18],[13,18],[14,18],[15,18],[16,18],[17,18],[3,18],[18,18],[4,18],[19,18],[23,18],[20,18],[21,18],[22,18],[24,18],[25,18],[26,18],[5,18],[27,18],[28,18],[29,18],[30,18],[6,18],[34,18],[31,18],[32,18],[33,18],[35,18],[7,18],[36,18],[41,18],[42,18],[37,18],[38,18],[39,18],[40,18],[43,18],[1,18],[44,18],[47,18],[110,52],[109,53],[111,18],[104,54],[112,55],[103,56]],"latestChangedDtsFile":"./index.d.ts"},"version":"5.5.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":";;AAWA,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CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,KAAK,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,86 +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 ImapSimple_1 = require("./ImapSimple");
24
- const errors_1 = require("./errors");
25
- async function connect(options) {
26
- var _a;
27
- const authTimeout = (_a = options.imap.authTimeout) !== null && _a !== void 0 ? _a : 2000;
28
- options.imap.authTimeout = authTimeout;
29
- const imap = new imap_1.default(options.imap);
30
- return await new Promise((resolve, reject) => {
31
- const cleanUp = () => {
32
- imap.removeListener('ready', imapOnReady);
33
- imap.removeListener('error', imapOnError);
34
- imap.removeListener('close', imapOnClose);
35
- imap.removeListener('end', imapOnEnd);
36
- };
37
- const imapOnReady = () => {
38
- cleanUp();
39
- resolve(new ImapSimple_1.ImapSimple(imap));
40
- };
41
- const imapOnError = (e) => {
42
- if (e.source === 'timeout-auth') {
43
- e = new errors_1.ConnectionTimeoutError(authTimeout);
44
- }
45
- cleanUp();
46
- reject(e);
47
- };
48
- const imapOnEnd = () => {
49
- cleanUp();
50
- reject(new errors_1.ConnectionEndedError());
51
- };
52
- const imapOnClose = () => {
53
- cleanUp();
54
- reject(new errors_1.ConnectionClosedError());
55
- };
56
- imap.once('ready', imapOnReady);
57
- imap.once('error', imapOnError);
58
- imap.once('close', imapOnClose);
59
- imap.once('end', imapOnEnd);
60
- if (options.onMail) {
61
- imap.on('mail', options.onMail);
62
- }
63
- if (options.onExpunge) {
64
- imap.on('expunge', options.onExpunge);
65
- }
66
- if (options.onUpdate) {
67
- imap.on('update', options.onUpdate);
68
- }
69
- imap.connect();
70
- });
71
- }
72
- function getParts(struct, parts = []) {
73
- for (let i = 0; i < struct.length; i++) {
74
- if (Array.isArray(struct[i])) {
75
- getParts(struct[i], parts);
76
- }
77
- else if (struct[i].partID) {
78
- parts.push(struct[i]);
79
- }
80
- }
81
- return parts;
82
- }
83
- __exportStar(require("./ImapSimple"), exports);
84
- __exportStar(require("./errors"), exports);
85
- __exportStar(require("./types"), exports);
86
- //# 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":";;;;;;;;;;;;;;;;;;;AAUA,0BAyDC;AAYD,4BAeC;AA5FD,gDAAwB;AACxB,6CAA0C;AAC1C,qCAA+F;AAMxF,KAAK,UAAU,OAAO,CAAC,O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wB"}
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":""}