imapflow 1.0.188 → 1.0.190
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 +15 -0
- package/lib/handler/imap-parser.js +8 -3
- package/lib/imap-flow.d.ts +786 -0
- package/lib/imap-flow.js +220 -89
- package/lib/search-compiler.js +157 -10
- package/lib/tools.js +4 -0
- package/package.json +11 -11
- package/lib/types.d.ts +0 -1123
- package/types.js +0 -56
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.190](https://github.com/postalsys/imapflow/compare/v1.0.189...v1.0.190) (2025-07-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **search:** Prefer WITHIN YOUNGER/OLDER instead of BEFORE/SINCE for searches if possible ([7492ac9](https://github.com/postalsys/imapflow/commit/7492ac9bd5598beadee7a72e3e3c63e25e9bc1f5))
|
|
9
|
+
|
|
10
|
+
## [1.0.189](https://github.com/postalsys/imapflow/compare/v1.0.188...v1.0.189) (2025-06-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* improved error handling ([0b955e4](https://github.com/postalsys/imapflow/commit/0b955e4e4a4ce05cae61ae603b68b84f3e19539c))
|
|
16
|
+
* Remove diacritics in ID values ([c79df56](https://github.com/postalsys/imapflow/commit/c79df5619f3cc6db36d3657a4746a112d2f33b15))
|
|
17
|
+
|
|
3
18
|
## [1.0.188](https://github.com/postalsys/imapflow/compare/v1.0.187...v1.0.188) (2025-06-13)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -11,14 +11,19 @@ module.exports = async (command, options) => {
|
|
|
11
11
|
// special case with a buggy IMAP server where responses are padded with zero bytes
|
|
12
12
|
if (command[0] === 0) {
|
|
13
13
|
// find the first non null byte and trim
|
|
14
|
+
let firstNonNull = -1;
|
|
14
15
|
for (let i = 0; i < command.length; i++) {
|
|
15
16
|
if (command[i] !== 0) {
|
|
16
|
-
|
|
17
|
-
command = command.slice(i);
|
|
18
|
-
nullBytesRemoved = i;
|
|
17
|
+
firstNonNull = i;
|
|
19
18
|
break;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
21
|
+
if (firstNonNull === -1) {
|
|
22
|
+
// All bytes are null
|
|
23
|
+
return { tag: '*', command: 'BAD', attributes: [] };
|
|
24
|
+
}
|
|
25
|
+
command = command.slice(firstNonNull);
|
|
26
|
+
nullBytesRemoved = firstNonNull;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
const parser = new ParserInstance(command, options);
|