imapflow 1.0.164 → 1.0.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,203 +1,182 @@
1
1
  # Changelog
2
2
 
3
- ## [1.0.164](https://github.com/postalsys/imapflow/compare/v1.0.163...v1.0.164) (2024-07-09)
3
+ ## [1.0.165](https://github.com/postalsys/imapflow/compare/v1.0.164...v1.0.165) (2024-11-01)
4
4
 
5
5
 
6
6
  ### Bug Fixes
7
7
 
8
- * **api:** Add fetchAll method ([#207](https://github.com/postalsys/imapflow/issues/207)) ([bc09998](https://github.com/postalsys/imapflow/commit/bc09998270006ea6ff8430b3461619dd9b3e91c8))
8
+ * **imap:** Support invalid servers that return a full partial instead of starting byte for a FETCH property ([7281ce9](https://github.com/postalsys/imapflow/commit/7281ce98683946f825b5bfec197beecad7867a70))
9
9
 
10
- ## [1.0.163](https://github.com/postalsys/imapflow/compare/v1.0.162...v1.0.163) (2024-07-06)
10
+ ## [1.0.164](https://github.com/postalsys/imapflow/compare/v1.0.163...v1.0.164) (2024-07-09)
11
+
12
+ ### Bug Fixes
11
13
 
14
+ - **api:** Add fetchAll method ([#207](https://github.com/postalsys/imapflow/issues/207)) ([bc09998](https://github.com/postalsys/imapflow/commit/bc09998270006ea6ff8430b3461619dd9b3e91c8))
15
+
16
+ ## [1.0.163](https://github.com/postalsys/imapflow/compare/v1.0.162...v1.0.163) (2024-07-06)
12
17
 
13
18
  ### Bug Fixes
14
19
 
15
- * **parser:** parse subfolders with square brackets ([0d0e8a6](https://github.com/postalsys/imapflow/commit/0d0e8a6ea379adf11594684d49a1ce5031339939))
16
- * **socket:** Use destroy() instead of destroySoon() ([830c2d1](https://github.com/postalsys/imapflow/commit/830c2d18f3d27eb12dc6babe4edd37fed5f65490))
20
+ - **parser:** parse subfolders with square brackets ([0d0e8a6](https://github.com/postalsys/imapflow/commit/0d0e8a6ea379adf11594684d49a1ce5031339939))
21
+ - **socket:** Use destroy() instead of destroySoon() ([830c2d1](https://github.com/postalsys/imapflow/commit/830c2d18f3d27eb12dc6babe4edd37fed5f65490))
17
22
 
18
23
  ## [1.0.162](https://github.com/postalsys/imapflow/compare/v1.0.161...v1.0.162) (2024-05-07)
19
24
 
20
-
21
25
  ### Bug Fixes
22
26
 
23
- * **idle:** Do not clear preCheck from other command ([cdf7643](https://github.com/postalsys/imapflow/commit/cdf7643952c975556e11a03ceca85f8a57fe1420))
27
+ - **idle:** Do not clear preCheck from other command ([cdf7643](https://github.com/postalsys/imapflow/commit/cdf7643952c975556e11a03ceca85f8a57fe1420))
24
28
 
25
29
  ## [1.0.161](https://github.com/postalsys/imapflow/compare/v1.0.160...v1.0.161) (2024-05-06)
26
30
 
27
-
28
31
  ### Bug Fixes
29
32
 
30
- * **listTree:** pass listing options as an optional argument ([917ba80](https://github.com/postalsys/imapflow/commit/917ba80f21b2fe485154acd252d6565b838e73e6))
33
+ - **listTree:** pass listing options as an optional argument ([917ba80](https://github.com/postalsys/imapflow/commit/917ba80f21b2fe485154acd252d6565b838e73e6))
31
34
 
32
35
  ## [1.0.160](https://github.com/postalsys/imapflow/compare/v1.0.159...v1.0.160) (2024-04-22)
33
36
 
34
-
35
37
  ### Bug Fixes
36
38
 
37
- * **copy:** Updated cipyright year to 2024 ([e3f5040](https://github.com/postalsys/imapflow/commit/e3f5040e8f90523e12108e978ac5002f8caa9e1e))
39
+ - **copy:** Updated cipyright year to 2024 ([e3f5040](https://github.com/postalsys/imapflow/commit/e3f5040e8f90523e12108e978ac5002f8caa9e1e))
38
40
 
39
41
  ## [1.0.159](https://github.com/postalsys/imapflow/compare/v1.0.158...v1.0.159) (2024-04-12)
40
42
 
41
-
42
43
  ### Bug Fixes
43
44
 
44
- * **deps:** Bumped deps ([53ccd8b](https://github.com/postalsys/imapflow/commit/53ccd8b1027782dcd2af6dd1f7d337007a7f79c0))
45
+ - **deps:** Bumped deps ([53ccd8b](https://github.com/postalsys/imapflow/commit/53ccd8b1027782dcd2af6dd1f7d337007a7f79c0))
45
46
 
46
47
  ## [1.0.158](https://github.com/postalsys/imapflow/compare/v1.0.157...v1.0.158) (2024-03-19)
47
48
 
48
-
49
49
  ### Bug Fixes
50
50
 
51
- * **locking:** log extra information about locks ([9790ec5](https://github.com/postalsys/imapflow/commit/9790ec575f405820d05dd4777987a88e0a4e819d))
51
+ - **locking:** log extra information about locks ([9790ec5](https://github.com/postalsys/imapflow/commit/9790ec575f405820d05dd4777987a88e0a4e819d))
52
52
 
53
53
  ## [1.0.157](https://github.com/postalsys/imapflow/compare/v1.0.156...v1.0.157) (2024-03-19)
54
54
 
55
-
56
55
  ### Bug Fixes
57
56
 
58
- * **logs:** Log mailbox lock description ([ce87cf5](https://github.com/postalsys/imapflow/commit/ce87cf5a256ddc324624893a1c17992475fafeb3))
57
+ - **logs:** Log mailbox lock description ([ce87cf5](https://github.com/postalsys/imapflow/commit/ce87cf5a256ddc324624893a1c17992475fafeb3))
59
58
 
60
59
  ## [1.0.156](https://github.com/postalsys/imapflow/compare/v1.0.155...v1.0.156) (2024-03-07)
61
60
 
62
-
63
61
  ### Bug Fixes
64
62
 
65
- * micro-optimizations for parser ([3451ad2](https://github.com/postalsys/imapflow/commit/3451ad235532ca1a64a829f9f2f8e77bcef3a17d))
63
+ - micro-optimizations for parser ([3451ad2](https://github.com/postalsys/imapflow/commit/3451ad235532ca1a64a829f9f2f8e77bcef3a17d))
66
64
 
67
65
  ## [1.0.155](https://github.com/postalsys/imapflow/compare/v1.0.154...v1.0.155) (2024-03-06)
68
66
 
69
-
70
67
  ### Bug Fixes
71
68
 
72
- * **exchange:** handle special error response from exchange ([3ed4198](https://github.com/postalsys/imapflow/commit/3ed4198c1b5504ab0b46926fec179c682988b2e3))
69
+ - **exchange:** handle special error response from exchange ([3ed4198](https://github.com/postalsys/imapflow/commit/3ed4198c1b5504ab0b46926fec179c682988b2e3))
73
70
 
74
71
  ## [1.0.154](https://github.com/postalsys/imapflow/compare/v1.0.153...v1.0.154) (2024-03-05)
75
72
 
76
-
77
73
  ### Bug Fixes
78
74
 
79
- * **FETCH:** throw on failing FETCH ([12f9a45](https://github.com/postalsys/imapflow/commit/12f9a45530c6f3a2f35ba2968819011eea9c32b2))
75
+ - **FETCH:** throw on failing FETCH ([12f9a45](https://github.com/postalsys/imapflow/commit/12f9a45530c6f3a2f35ba2968819011eea9c32b2))
80
76
 
81
77
  ## [1.0.153](https://github.com/postalsys/imapflow/compare/v1.0.152...v1.0.153) (2024-02-29)
82
78
 
83
-
84
79
  ### Bug Fixes
85
80
 
86
- * **deps:** Bumped deps ([559aa72](https://github.com/postalsys/imapflow/commit/559aa72337018f21a3675f4521ce4aae87e0aabb))
81
+ - **deps:** Bumped deps ([559aa72](https://github.com/postalsys/imapflow/commit/559aa72337018f21a3675f4521ce4aae87e0aabb))
87
82
 
88
83
  ## [1.0.152](https://github.com/postalsys/imapflow/compare/v1.0.151...v1.0.152) (2024-02-12)
89
84
 
90
-
91
85
  ### Bug Fixes
92
86
 
93
- * **address:** do not use '@' instead of empyt address if a field does not contain a value ([aeabbde](https://github.com/postalsys/imapflow/commit/aeabbded3bf3c6ba7266f79d4bc001980644da0d))
87
+ - **address:** do not use '@' instead of empyt address if a field does not contain a value ([aeabbde](https://github.com/postalsys/imapflow/commit/aeabbded3bf3c6ba7266f79d4bc001980644da0d))
94
88
 
95
89
  ## [1.0.151](https://github.com/postalsys/imapflow/compare/v1.0.150...v1.0.151) (2024-02-12)
96
90
 
97
-
98
91
  ### Bug Fixes
99
92
 
100
- * **filename:** Fixed filename decoding for the download method ([68a8159](https://github.com/postalsys/imapflow/commit/68a8159a0988245bf3f7c9b002823b01d9d24876))
93
+ - **filename:** Fixed filename decoding for the download method ([68a8159](https://github.com/postalsys/imapflow/commit/68a8159a0988245bf3f7c9b002823b01d9d24876))
101
94
 
102
95
  ## [1.0.150](https://github.com/postalsys/imapflow/compare/v1.0.149...v1.0.150) (2024-02-01)
103
96
 
104
-
105
97
  ### Bug Fixes
106
98
 
107
- * **deps:** Bumped Nodemailer version ([ee02764](https://github.com/postalsys/imapflow/commit/ee0276493494ecf08be557cc0c486fe309d359bf))
99
+ - **deps:** Bumped Nodemailer version ([ee02764](https://github.com/postalsys/imapflow/commit/ee0276493494ecf08be557cc0c486fe309d359bf))
108
100
 
109
101
  ## [1.0.149](https://github.com/postalsys/imapflow/compare/v1.0.148...v1.0.149) (2024-01-31)
110
102
 
111
-
112
103
  ### Bug Fixes
113
104
 
114
- * **flag-colors:** added a method to set Flag Color. The color is also included in the Fetch response structure ([d840951](https://github.com/postalsys/imapflow/commit/d8409513075b864e9131665af3f1670a0714d05c))
105
+ - **flag-colors:** added a method to set Flag Color. The color is also included in the Fetch response structure ([d840951](https://github.com/postalsys/imapflow/commit/d8409513075b864e9131665af3f1670a0714d05c))
115
106
 
116
107
  ## [1.0.148](https://github.com/postalsys/imapflow/compare/v1.0.147...v1.0.148) (2024-01-16)
117
108
 
118
-
119
109
  ### Bug Fixes
120
110
 
121
- * **logout:** Fixed race condition for logout and TCP close. Fixes [#161](https://github.com/postalsys/imapflow/issues/161) ([39a7333](https://github.com/postalsys/imapflow/commit/39a7333a39499e4876abb29149f7c72f2f99a63d))
111
+ - **logout:** Fixed race condition for logout and TCP close. Fixes [#161](https://github.com/postalsys/imapflow/issues/161) ([39a7333](https://github.com/postalsys/imapflow/commit/39a7333a39499e4876abb29149f7c72f2f99a63d))
122
112
 
123
113
  ## [1.0.147](https://github.com/postalsys/imapflow/compare/v1.0.146...v1.0.147) (2023-10-26)
124
114
 
125
-
126
115
  ### Bug Fixes
127
116
 
128
- * **idle:** removed unneeded variable ([da59d9a](https://github.com/postalsys/imapflow/commit/da59d9a960dd0992b22335902808a315b1cb6ded))
117
+ - **idle:** removed unneeded variable ([da59d9a](https://github.com/postalsys/imapflow/commit/da59d9a960dd0992b22335902808a315b1cb6ded))
129
118
 
130
119
  ## [1.0.146](https://github.com/postalsys/imapflow/compare/v1.0.145...v1.0.146) (2023-10-26)
131
120
 
132
-
133
121
  ### Bug Fixes
134
122
 
135
- * **throttling:** automatically retry throttled FETCH commands a few times ([07a9aea](https://github.com/postalsys/imapflow/commit/07a9aea37ae55ed885ccc4c0e3732b367ad82cd3))
123
+ - **throttling:** automatically retry throttled FETCH commands a few times ([07a9aea](https://github.com/postalsys/imapflow/commit/07a9aea37ae55ed885ccc4c0e3732b367ad82cd3))
136
124
 
137
125
  ## [1.0.145](https://github.com/postalsys/imapflow/compare/v1.0.144...v1.0.145) (2023-10-26)
138
126
 
139
-
140
127
  ### Bug Fixes
141
128
 
142
- * **docs:** Fixed mailbox property name in AppendResponseObject ([ca6d789](https://github.com/postalsys/imapflow/commit/ca6d789b761d3117f733ed7b026122098f4d9142))
143
- * **special-use:** support custom special use flags for the Archive folder ([17aa6a8](https://github.com/postalsys/imapflow/commit/17aa6a8baf180a7349fe30f897184eb8e359a498))
129
+ - **docs:** Fixed mailbox property name in AppendResponseObject ([ca6d789](https://github.com/postalsys/imapflow/commit/ca6d789b761d3117f733ed7b026122098f4d9142))
130
+ - **special-use:** support custom special use flags for the Archive folder ([17aa6a8](https://github.com/postalsys/imapflow/commit/17aa6a8baf180a7349fe30f897184eb8e359a498))
144
131
 
145
132
  ## [1.0.144](https://github.com/postalsys/imapflow/compare/v1.0.143...v1.0.144) (2023-09-13)
146
133
 
147
-
148
134
  ### Bug Fixes
149
135
 
150
- * **MS365:** Wait until responding with a throttling response ([#142](https://github.com/postalsys/imapflow/issues/142)) ([09bfb3e](https://github.com/postalsys/imapflow/commit/09bfb3e1b90bdd37bc1c9b40e9284ad4afbd5c72))
136
+ - **MS365:** Wait until responding with a throttling response ([#142](https://github.com/postalsys/imapflow/issues/142)) ([09bfb3e](https://github.com/postalsys/imapflow/commit/09bfb3e1b90bdd37bc1c9b40e9284ad4afbd5c72))
151
137
 
152
138
  ## [1.0.143](https://github.com/postalsys/imapflow/compare/v1.0.142...v1.0.143) (2023-09-04)
153
139
 
154
-
155
140
  ### Bug Fixes
156
141
 
157
- * **release:** updated provenance setting ([e178629](https://github.com/postalsys/imapflow/commit/e1786296569e5a0acfb997b007091925519c7d79))
142
+ - **release:** updated provenance setting ([e178629](https://github.com/postalsys/imapflow/commit/e1786296569e5a0acfb997b007091925519c7d79))
158
143
 
159
144
  ## [1.0.142](https://github.com/postalsys/imapflow/compare/v1.0.141...v1.0.142) (2023-09-04)
160
145
 
161
-
162
146
  ### Bug Fixes
163
147
 
164
- * **release:** updated provenance setting ([4fd5fa8](https://github.com/postalsys/imapflow/commit/4fd5fa8aa74756c1b9ff166febf294acda4792b8))
148
+ - **release:** updated provenance setting ([4fd5fa8](https://github.com/postalsys/imapflow/commit/4fd5fa8aa74756c1b9ff166febf294acda4792b8))
165
149
 
166
150
  ## [1.0.141](https://github.com/postalsys/imapflow/compare/v1.0.140...v1.0.141) (2023-09-04)
167
151
 
168
-
169
152
  ### Bug Fixes
170
153
 
171
- * **readme:** testing note format ([3038c4d](https://github.com/postalsys/imapflow/commit/3038c4d9740af0a5161bbc45dd13b86d4febc0ac))
154
+ - **readme:** testing note format ([3038c4d](https://github.com/postalsys/imapflow/commit/3038c4d9740af0a5161bbc45dd13b86d4febc0ac))
172
155
 
173
156
  ## [1.0.140](https://github.com/postalsys/imapflow/compare/v1.0.139...v1.0.140) (2023-09-04)
174
157
 
175
-
176
158
  ### Bug Fixes
177
159
 
178
- * **license:** bumped license timeframe in README ([9a04730](https://github.com/postalsys/imapflow/commit/9a047309d10c0ef056c53fba3493df9f2fea5a1d))
160
+ - **license:** bumped license timeframe in README ([9a04730](https://github.com/postalsys/imapflow/commit/9a047309d10c0ef056c53fba3493df9f2fea5a1d))
179
161
 
180
162
  ## [1.0.139](https://github.com/postalsys/imapflow/compare/v1.0.138...v1.0.139) (2023-09-04)
181
163
 
182
-
183
164
  ### Bug Fixes
184
165
 
185
- * **license:** Bumped license timeframe ([ce308b6](https://github.com/postalsys/imapflow/commit/ce308b66e5d30819c6bab7d75752528abc4b8436))
166
+ - **license:** Bumped license timeframe ([ce308b6](https://github.com/postalsys/imapflow/commit/ce308b66e5d30819c6bab7d75752528abc4b8436))
186
167
 
187
168
  ## [1.0.138](https://github.com/postalsys/imapflow/compare/v1.0.137...v1.0.138) (2023-09-04)
188
169
 
189
-
190
170
  ### Bug Fixes
191
171
 
192
- * **release:** Added package-lock ([e35bda8](https://github.com/postalsys/imapflow/commit/e35bda8a2b14503ba30a46b555df82ab1084cf5a))
193
- * **release:** updated package-lock ([b59220f](https://github.com/postalsys/imapflow/commit/b59220f54a58111e0b3259c502ff51b2a624f397))
172
+ - **release:** Added package-lock ([e35bda8](https://github.com/postalsys/imapflow/commit/e35bda8a2b14503ba30a46b555df82ab1084cf5a))
173
+ - **release:** updated package-lock ([b59220f](https://github.com/postalsys/imapflow/commit/b59220f54a58111e0b3259c502ff51b2a624f397))
194
174
 
195
175
  ## [1.0.137](https://github.com/postalsys/imapflow/compare/v1.0.136...v1.0.137) (2023-09-04)
196
176
 
197
-
198
177
  ### Bug Fixes
199
178
 
200
- * **deps:** Bumped dependencies ([e8f5e8c](https://github.com/postalsys/imapflow/commit/e8f5e8ce431debddeecf523fa8739ae5ad23c659))
179
+ - **deps:** Bumped dependencies ([e8f5e8c](https://github.com/postalsys/imapflow/commit/e8f5e8ce431debddeecf523fa8739ae5ad23c659))
201
180
 
202
181
  ## CHANGELOG
203
182
 
@@ -247,7 +226,7 @@
247
226
 
248
227
  - 1.0.112 - 2022-10-16
249
228
 
250
- - Improved ID compatiblity with servers that allow ID only after login
229
+ - Improved ID compatibility with servers that allow ID only after login
251
230
 
252
231
  - 1.0.111 - 2022-10-13
253
232
 
@@ -455,7 +434,7 @@
455
434
 
456
435
  - 1.0.42 - 2020-04-13
457
436
 
458
- - Try to hande edge case when authenticating against Exchange IMAP
437
+ - Try to handle edge case when authenticating against Exchange IMAP
459
438
 
460
439
  - 1.0.41 - 2020-04-12
461
440
 
@@ -105,7 +105,7 @@ async function runIdle(connection) {
105
105
  }
106
106
  }
107
107
 
108
- // Listes for changes in mailbox
108
+ // Listens for changes in mailbox
109
109
  module.exports = async (connection, maxIdleTime) => {
110
110
  if (connection.state !== connection.states.SELECTED) {
111
111
  // nothing to do here
@@ -61,7 +61,7 @@ module.exports = async (response, options) => {
61
61
  lastType = 'LIST';
62
62
  resp.push(formatRespEntry('('));
63
63
 
64
- // check if we need to skip separtor WS between two arrays
64
+ // check if we need to skip separator WS between two arrays
65
65
  let subArray = node.length > 1 && Array.isArray(node[0]);
66
66
 
67
67
  for (let child of node) {
package/lib/imap-flow.js CHANGED
@@ -1330,7 +1330,7 @@ class ImapFlow extends EventEmitter {
1330
1330
 
1331
1331
  this.greetingTimeout = setTimeout(() => {
1332
1332
  let err = new Error(`Failed to receive greeting from server in required time${!this.secureConnection ? '. Maybe should use TLS?' : ''}`);
1333
- err.code = 'GREEETING_TIMEOUT';
1333
+ err.code = 'GREETING_TIMEOUT';
1334
1334
  err.details = {
1335
1335
  greetingTimeout: this.options.greetingTimeout || GREETING_TIMEOUT
1336
1336
  };
@@ -1371,7 +1371,7 @@ class ImapFlow extends EventEmitter {
1371
1371
  };
1372
1372
 
1373
1373
  if (socket) {
1374
- // socket is already establised via proxy
1374
+ // socket is already established via proxy
1375
1375
  if (this.secureConnection) {
1376
1376
  // TLS socket requires a handshake
1377
1377
  opts.socket = socket;
@@ -1841,7 +1841,7 @@ class ImapFlow extends EventEmitter {
1841
1841
  * @property {Date|string} [sentSince] Matches messages sent after date
1842
1842
  * @property {String} [keyword] Matches messages that have the custom flag set
1843
1843
  * @property {String} [unKeyword] Matches messages that do not have the custom flag set
1844
- * @property {Object.<string, Boolean|String>} [header] Mathces messages with header key set if value is `true` (**NB!** not supported by all servers) or messages where header partially matches a string value
1844
+ * @property {Object.<string, Boolean|String>} [header] Matches messages with header key set if value is `true` (**NB!** not supported by all servers) or messages where header partially matches a string value
1845
1845
  * @property {SearchObject[]} [or] An array of 2 or more {@link SearchObject} objects. At least on of these must match
1846
1846
  */
1847
1847
 
@@ -2213,7 +2213,7 @@ class ImapFlow extends EventEmitter {
2213
2213
  * @property {Number} [size] Expected size of the node
2214
2214
  * @property {MessageEnvelopeObject} [envelope] message envelope of embedded RFC822 message
2215
2215
  * @property {String} [disposition] Content disposition
2216
- * @property {Object} [dispositionParameters] Additional parameters for Conent-Disposition
2216
+ * @property {Object} [dispositionParameters] Additional parameters for Content-Disposition
2217
2217
  * @property {MessageStructureObject[]} childNodes An array of child nodes if this is a multipart node. Not present for normal nodes
2218
2218
  */
2219
2219
 
@@ -2428,14 +2428,14 @@ class ImapFlow extends EventEmitter {
2428
2428
  * @property {Object} meta content metadata
2429
2429
  * @property {number} meta.expectedSize The fetch response size
2430
2430
  * @property {String} meta.contentType Content-Type of the streamed file. If part was not set then this value is "message/rfc822"
2431
- * @property {String} [meta.charset] Charset of the body part. Text parts are automaticaly converted to UTF-8, attachments are kept as is
2431
+ * @property {String} [meta.charset] Charset of the body part. Text parts are automatically converted to UTF-8, attachments are kept as is
2432
2432
  * @property {String} [meta.disposition] Content-Disposition of the streamed file
2433
2433
  * @property {String} [meta.filename] Filename of the streamed body part
2434
2434
  * @property {ReadableStream} content Streamed content
2435
2435
  */
2436
2436
 
2437
2437
  /**
2438
- * Download either full rfc822 formated message or a specific bodystructure part as a Stream.
2438
+ * Download either full rfc822 formatted message or a specific bodystructure part as a Stream.
2439
2439
  * Bodystructure parts are decoded so the resulting stream is a binary file. Text content
2440
2440
  * is automatically converted to UTF-8 charset.
2441
2441
  *
@@ -3093,7 +3093,7 @@ class ImapFlow extends EventEmitter {
3093
3093
  }
3094
3094
 
3095
3095
  /**
3096
- * Connection close event. **NB!** ImapFlow does not handle reconncts automatically.
3096
+ * Connection close event. **NB!** ImapFlow does not handle reconnects automatically.
3097
3097
  * So whenever a 'close' event occurs you must create a new connection yourself.
3098
3098
  *
3099
3099
  * @event module:imapflow~ImapFlow#close
package/lib/tools.js CHANGED
@@ -250,7 +250,7 @@ module.exports = {
250
250
  )
251
251
  .toString()
252
252
  .toLowerCase()
253
- .replace(/<\d+>$/, '');
253
+ .replace(/<\d+(\.\d+)?>$/, '');
254
254
  continue;
255
255
  }
256
256
  if (typeof key !== 'string') {
package/lib/types.d.ts CHANGED
@@ -494,7 +494,7 @@ declare module "imapflow" {
494
494
  binary?: boolean;
495
495
  }): Promise<FetchMessageObject>;
496
496
  /**
497
- * Download either full rfc822 formated message or a specific bodystructure part as a Stream.
497
+ * Download either full rfc822 formatted message or a specific bodystructure part as a Stream.
498
498
  * Bodystructure parts are decoded so the resulting stream is a binary file. Text content
499
499
  * is automatically converted to UTF-8 charset.
500
500
  * @example
@@ -812,7 +812,7 @@ declare type SequenceString = string;
812
812
  * @property [sentSince] - Matches messages sent after date
813
813
  * @property [keyword] - Matches messages that have the custom flag set
814
814
  * @property [unKeyword] - Matches messages that do not have the custom flag set
815
- * @property [header] - Mathces messages with header key set if value is `true` (**NB!** not supported by all servers) or messages where header partially matches a string value
815
+ * @property [header] - Matches messages with header key set if value is `true` (**NB!** not supported by all servers) or messages where header partially matches a string value
816
816
  * @property [or] - An array of 2 or more {@link SearchObject} objects. At least on of these must match
817
817
  */
818
818
  declare type SearchObject = {
@@ -956,7 +956,7 @@ declare type MessageEnvelopeObject = {
956
956
  * @property [size] - Expected size of the node
957
957
  * @property [envelope] - message envelope of embedded RFC822 message
958
958
  * @property [disposition] - Content disposition
959
- * @property [dispositionParameters] - Additional parameters for Conent-Disposition
959
+ * @property [dispositionParameters] - Additional parameters for Content-Disposition
960
960
  * @property childNodes - An array of child nodes if this is a multipart node. Not present for normal nodes
961
961
  */
962
962
  declare type MessageStructureObject = {
@@ -1012,7 +1012,7 @@ declare type FetchMessageObject = {
1012
1012
  * @property meta - content metadata
1013
1013
  * @property meta.expectedSize - The fetch response size
1014
1014
  * @property meta.contentType - Content-Type of the streamed file. If part was not set then this value is "message/rfc822"
1015
- * @property [meta.charset] - Charset of the body part. Text parts are automaticaly converted to UTF-8, attachments are kept as is
1015
+ * @property [meta.charset] - Charset of the body part. Text parts are automatically converted to UTF-8, attachments are kept as is
1016
1016
  * @property [meta.disposition] - Content-Disposition of the streamed file
1017
1017
  * @property [meta.filename] - Filename of the streamed body part
1018
1018
  * @property content - Streamed content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imapflow",
3
- "version": "1.0.164",
3
+ "version": "1.0.165",
4
4
  "description": "IMAP Client for Node",
5
5
  "main": "./lib/imap-flow.js",
6
6
  "scripts": {
@@ -28,21 +28,21 @@
28
28
  },
29
29
  "homepage": "https://imapflow.com/",
30
30
  "devDependencies": {
31
- "@babel/eslint-parser": "7.24.7",
32
- "@babel/eslint-plugin": "7.24.7",
31
+ "@babel/eslint-parser": "7.25.9",
32
+ "@babel/eslint-plugin": "7.25.9",
33
33
  "@babel/plugin-syntax-class-properties": "7.12.13",
34
- "@babel/preset-env": "7.24.7",
35
- "@types/node": "20.14.10",
34
+ "@babel/preset-env": "7.26.0",
35
+ "@types/node": "22.8.6",
36
36
  "eslint": "8.57.0",
37
37
  "eslint-config-nodemailer": "1.2.0",
38
38
  "eslint-config-prettier": "9.1.0",
39
39
  "grunt": "1.6.1",
40
- "grunt-cli": "1.4.3",
40
+ "grunt-cli": "1.5.0",
41
41
  "grunt-contrib-nodeunit": "5.0.0",
42
42
  "grunt-eslint": "24.3.0",
43
43
  "imapflow-jsdoc-template": "3.4.0-imapflow.1",
44
44
  "jsdoc": "3.6.11",
45
- "st": "3.0.0",
45
+ "st": "3.0.1",
46
46
  "tsd-jsdoc": "2.5.0"
47
47
  },
48
48
  "dependencies": {
@@ -52,8 +52,8 @@
52
52
  "libmime": "5.3.5",
53
53
  "libqp": "2.1.0",
54
54
  "mailsplit": "5.4.0",
55
- "nodemailer": "6.9.14",
56
- "pino": "9.2.0",
55
+ "nodemailer": "6.9.16",
56
+ "pino": "9.5.0",
57
57
  "socks": "2.8.3"
58
58
  }
59
59
  }
@@ -1002,3 +1002,62 @@ module.exports['IMAP Parser, subfolder square bracket'] = test =>
1002
1002
  { type: 'ATOM', value: 'INBOX.[Airmail].Snooze' }
1003
1003
  ]);
1004
1004
  });
1005
+
1006
+ module.exports['IMAP Parser, FETCH with full range'] = test =>
1007
+ asyncWrapper(test, async test => {
1008
+ let parsed = await parser('* 32 FETCH (UID 32 RFC822.SIZE 3991 BODY[2.MIME] "(* 61B literal *)" BODY[2]<0.65536> "(* 6B literal *)")');
1009
+ console.log(JSON.stringify(parsed.attributes));
1010
+ test.deepEqual(parsed.attributes, [
1011
+ {
1012
+ type: 'ATOM',
1013
+ value: 'FETCH'
1014
+ },
1015
+ [
1016
+ {
1017
+ type: 'ATOM',
1018
+ value: 'UID'
1019
+ },
1020
+ {
1021
+ type: 'ATOM',
1022
+ value: '32'
1023
+ },
1024
+ {
1025
+ type: 'ATOM',
1026
+ value: 'RFC822.SIZE'
1027
+ },
1028
+ {
1029
+ type: 'ATOM',
1030
+ value: '3991'
1031
+ },
1032
+ {
1033
+ type: 'ATOM',
1034
+ value: 'BODY',
1035
+ section: [
1036
+ {
1037
+ type: 'ATOM',
1038
+ value: '2.MIME'
1039
+ }
1040
+ ]
1041
+ },
1042
+ {
1043
+ type: 'STRING',
1044
+ value: '(* 61B literal *)'
1045
+ },
1046
+ {
1047
+ type: 'ATOM',
1048
+ value: 'BODY',
1049
+ section: [
1050
+ {
1051
+ type: 'ATOM',
1052
+ value: '2'
1053
+ }
1054
+ ],
1055
+ partial: [0, 65536]
1056
+ },
1057
+ {
1058
+ type: 'STRING',
1059
+ value: '(* 6B literal *)'
1060
+ }
1061
+ ]
1062
+ ]);
1063
+ });