@bobfrankston/rmfmail 1.1.26 → 1.1.28

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.
@@ -7126,6 +7126,10 @@ function tokenizeParenList(s) {
7126
7126
  let j = i;
7127
7127
  while (j < end && str[j] !== " " && str[j] !== ")" && str[j] !== "(")
7128
7128
  j++;
7129
+ if (j === i) {
7130
+ i++;
7131
+ continue;
7132
+ }
7129
7133
  tokens.push(str.substring(i, j));
7130
7134
  i = j;
7131
7135
  }
@@ -7596,17 +7600,18 @@ var NativeImapClient = class {
7596
7600
  items.push("BODY.PEEK[]");
7597
7601
  const tag = nextTag();
7598
7602
  const streamed = [];
7599
- const cb = onMessage ? (resp) => {
7603
+ const cb = (resp) => {
7600
7604
  if (resp.tag !== "*" || resp.type !== "FETCH")
7601
7605
  return;
7602
7606
  const parsed = this.parseFetchResponses([resp]);
7603
7607
  for (const msg of parsed) {
7604
7608
  streamed.push(msg);
7605
- onMessage(msg);
7609
+ if (onMessage)
7610
+ onMessage(msg);
7606
7611
  }
7607
- } : void 0;
7608
- const responses = await this.sendCommand(tag, fetchCommand(tag, range, items), cb);
7609
- return onMessage ? streamed : this.parseFetchResponses(responses);
7612
+ };
7613
+ await this.sendCommand(tag, fetchCommand(tag, range, items), cb);
7614
+ return streamed;
7610
7615
  }
7611
7616
  /**
7612
7617
  * Folder-scoped batch body fetch. Selects `folderPath`, issues a single