@clazic/kordoc 2.7.0 → 2.7.1

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.
@@ -7,7 +7,7 @@ import {
7
7
  precheckZipSize,
8
8
  sanitizeHref,
9
9
  toArrayBuffer
10
- } from "./chunk-USE7IDLV.js";
10
+ } from "./chunk-YIJCHZLO.js";
11
11
  import {
12
12
  parsePageRange
13
13
  } from "./chunk-MOL7MDBG.js";
@@ -9920,13 +9920,17 @@ async function downloadWithProgress(url, dest, totalBytes, onProgress) {
9920
9920
  while (true) {
9921
9921
  const { done, value } = await reader.read();
9922
9922
  if (done) break;
9923
- file.write(value);
9923
+ if (!file.write(value)) {
9924
+ await new Promise((resolve2) => file.once("drain", resolve2));
9925
+ }
9924
9926
  downloaded += value.length;
9925
9927
  onProgress?.(downloaded, totalBytes);
9926
9928
  }
9927
9929
  } finally {
9928
- file.end();
9929
9930
  reader.releaseLock();
9931
+ await new Promise((resolve2, reject) => {
9932
+ file.end((err) => err ? reject(err) : resolve2());
9933
+ });
9930
9934
  }
9931
9935
  }
9932
9936
  async function installForPlatform(pkg, onProgress) {
@@ -10685,4 +10689,4 @@ export {
10685
10689
  cfb/cfb.js:
10686
10690
  (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
10687
10691
  */
10688
- //# sourceMappingURL=chunk-3FTA6V7S.js.map
10692
+ //# sourceMappingURL=chunk-FZJLIDFL.js.map