@clazic/kordoc 2.7.0 → 2.7.2
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/{chunk-3FTA6V7S.js → chunk-OF2YI3AC.js} +15 -10
- package/dist/{chunk-3FTA6V7S.js.map → chunk-OF2YI3AC.js.map} +1 -1
- package/dist/{chunk-USE7IDLV.js → chunk-WMQBWE6H.js} +2 -2
- package/dist/cli.js +6 -6
- package/dist/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{utils-XYBJBWM2.js → utils-CJPB6YNH.js} +2 -2
- package/dist/{watch-CJRS6OYE.js → watch-MMYT64UO.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-USE7IDLV.js.map → chunk-WMQBWE6H.js.map} +0 -0
- /package/dist/{utils-XYBJBWM2.js.map → utils-CJPB6YNH.js.map} +0 -0
- /package/dist/{watch-CJRS6OYE.js.map → watch-MMYT64UO.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
precheckZipSize,
|
|
8
8
|
sanitizeHref,
|
|
9
9
|
toArrayBuffer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WMQBWE6H.js";
|
|
11
11
|
import {
|
|
12
12
|
parsePageRange
|
|
13
13
|
} from "./chunk-MOL7MDBG.js";
|
|
@@ -9847,19 +9847,19 @@ var CACHE_DIR = join2(homedir(), ".cache", "kordoc", "libreoffice");
|
|
|
9847
9847
|
var VERSION_FILE = join2(CACHE_DIR, "version");
|
|
9848
9848
|
var PACKAGES = {
|
|
9849
9849
|
darwin: {
|
|
9850
|
-
url: "https://
|
|
9850
|
+
url: "https://ftp.osuosl.org/pub/tdf/libreoffice/stable/26.2.3/mac/x86_64/LibreOffice_26.2.3_MacOS_x86-64.dmg",
|
|
9851
9851
|
binPath: "LibreOffice.app/Contents/MacOS/soffice",
|
|
9852
9852
|
sizeMb: 300
|
|
9853
9853
|
},
|
|
9854
9854
|
linux: {
|
|
9855
|
-
url: "https://
|
|
9856
|
-
binPath: "opt/
|
|
9857
|
-
sizeMb:
|
|
9855
|
+
url: "https://ftp.osuosl.org/pub/tdf/libreoffice/stable/26.2.3/deb/x86_64/LibreOffice_26.2.3_Linux_x86-64_deb.tar.gz",
|
|
9856
|
+
binPath: "opt/libreoffice26.2/program/soffice",
|
|
9857
|
+
sizeMb: 210
|
|
9858
9858
|
},
|
|
9859
9859
|
win32: {
|
|
9860
|
-
url: "https://
|
|
9860
|
+
url: "https://ftp.osuosl.org/pub/tdf/libreoffice/stable/26.2.3/win/x86_64/LibreOffice_26.2.3_Win_x86-64.msi",
|
|
9861
9861
|
binPath: "LibreOffice/program/soffice.exe",
|
|
9862
|
-
sizeMb:
|
|
9862
|
+
sizeMb: 360
|
|
9863
9863
|
}
|
|
9864
9864
|
};
|
|
9865
9865
|
async function findInPath() {
|
|
@@ -9912,6 +9912,7 @@ async function findInDefaultPaths() {
|
|
|
9912
9912
|
}
|
|
9913
9913
|
async function downloadWithProgress(url, dest, totalBytes, onProgress) {
|
|
9914
9914
|
const response = await fetch(url);
|
|
9915
|
+
if (!response.ok) throw new Error(`\uB2E4\uC6B4\uB85C\uB4DC \uC2E4\uD328: HTTP ${response.status} (${url})`);
|
|
9915
9916
|
if (!response.body) throw new Error("\uB2E4\uC6B4\uB85C\uB4DC \uC2E4\uD328: response body \uC5C6\uC74C");
|
|
9916
9917
|
const file = createWriteStream(dest);
|
|
9917
9918
|
const reader = response.body.getReader();
|
|
@@ -9920,13 +9921,17 @@ async function downloadWithProgress(url, dest, totalBytes, onProgress) {
|
|
|
9920
9921
|
while (true) {
|
|
9921
9922
|
const { done, value } = await reader.read();
|
|
9922
9923
|
if (done) break;
|
|
9923
|
-
file.write(value)
|
|
9924
|
+
if (!file.write(value)) {
|
|
9925
|
+
await new Promise((resolve2) => file.once("drain", resolve2));
|
|
9926
|
+
}
|
|
9924
9927
|
downloaded += value.length;
|
|
9925
9928
|
onProgress?.(downloaded, totalBytes);
|
|
9926
9929
|
}
|
|
9927
9930
|
} finally {
|
|
9928
|
-
file.end();
|
|
9929
9931
|
reader.releaseLock();
|
|
9932
|
+
await new Promise((resolve2, reject) => {
|
|
9933
|
+
file.end((err) => err ? reject(err) : resolve2());
|
|
9934
|
+
});
|
|
9930
9935
|
}
|
|
9931
9936
|
}
|
|
9932
9937
|
async function installForPlatform(pkg, onProgress) {
|
|
@@ -10685,4 +10690,4 @@ export {
|
|
|
10685
10690
|
cfb/cfb.js:
|
|
10686
10691
|
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
|
10687
10692
|
*/
|
|
10688
|
-
//# sourceMappingURL=chunk-
|
|
10693
|
+
//# sourceMappingURL=chunk-OF2YI3AC.js.map
|