chatroom-cli 1.69.1 → 1.70.0

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/dist/index.js CHANGED
@@ -76102,12 +76102,17 @@ function createDefaultDeps6() {
76102
76102
  }
76103
76103
  const chunks = [];
76104
76104
  let totalBytes = 0;
76105
- for await (const chunk2 of response.body) {
76106
- totalBytes += chunk2.byteLength;
76105
+ const reader = response.body.getReader();
76106
+ for (;; ) {
76107
+ const { done: done9, value } = await reader.read();
76108
+ if (done9)
76109
+ break;
76110
+ totalBytes += value.byteLength;
76107
76111
  if (totalBytes > MAX_DOWNLOAD_BYTES) {
76112
+ await reader.cancel();
76108
76113
  throw new Error("PDF exceeds maximum size of 50MB");
76109
76114
  }
76110
- chunks.push(chunk2);
76115
+ chunks.push(value);
76111
76116
  }
76112
76117
  return Buffer.concat(chunks);
76113
76118
  }
@@ -113425,4 +113430,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
113425
113430
  });
113426
113431
  program2.parse();
113427
113432
 
113428
- //# debugId=FD69F45D45D4302D64756E2164756E21
113433
+ //# debugId=EEDF99734E15FED664756E2164756E21