@clazic/kordoc 2.7.3 → 2.7.4
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-WE7MWE73.js → chunk-EJZO6DUI.js} +16 -6
- package/dist/{chunk-WE7MWE73.js.map → chunk-EJZO6DUI.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/{watch-A4DEF4GF.js → watch-CVSZKJE3.js} +2 -2
- package/package.json +1 -1
- /package/dist/{watch-A4DEF4GF.js.map → watch-CVSZKJE3.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -11343,8 +11343,13 @@ async function installForPlatform(pkg, onProgress) {
|
|
|
11343
11343
|
async function installMacOS(pkg, downloadPath) {
|
|
11344
11344
|
const mountPoint = `/Volumes/LibreOffice_${Date.now()}`;
|
|
11345
11345
|
await new Promise((resolve4, reject) => {
|
|
11346
|
-
const
|
|
11347
|
-
child
|
|
11346
|
+
const stderr = [];
|
|
11347
|
+
const child = spawn2("hdiutil", ["attach", "-nobrowse", "-noverify", "-mountpoint", mountPoint, downloadPath]);
|
|
11348
|
+
child.stderr?.on("data", (d) => stderr.push(d.toString()));
|
|
11349
|
+
child.on(
|
|
11350
|
+
"close",
|
|
11351
|
+
(code) => code === 0 ? resolve4() : reject(new Error(`dmg \uB9C8\uC6B4\uD2B8 \uC2E4\uD328 (code=${code}): ${stderr.join("").trim()}`))
|
|
11352
|
+
);
|
|
11348
11353
|
});
|
|
11349
11354
|
try {
|
|
11350
11355
|
const appSource = join4(mountPoint, "LibreOffice.app");
|
|
@@ -11472,6 +11477,7 @@ async function resolveSoffice(emitter, autoInstall = true) {
|
|
|
11472
11477
|
|
|
11473
11478
|
// src/convert/libreoffice.ts
|
|
11474
11479
|
var libreConvert = libre.convert;
|
|
11480
|
+
var libreConvertWithOptions = libre.convertWithOptions;
|
|
11475
11481
|
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
11476
11482
|
return new Promise((resolve4, reject) => {
|
|
11477
11483
|
const timer = setTimeout(() => {
|
|
@@ -11479,8 +11485,7 @@ async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
|
11479
11485
|
new ConvertError("TIMEOUT", `\uBCC0\uD658 \uD0C0\uC784\uC544\uC6C3 (${timeoutMs}ms \uCD08\uACFC)`)
|
|
11480
11486
|
);
|
|
11481
11487
|
}, timeoutMs);
|
|
11482
|
-
const
|
|
11483
|
-
libreConvert(buffer, targetExt, opts, (err, done) => {
|
|
11488
|
+
const cb = (err, done) => {
|
|
11484
11489
|
clearTimeout(timer);
|
|
11485
11490
|
if (err || !done) {
|
|
11486
11491
|
reject(
|
|
@@ -11492,7 +11497,12 @@ async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
|
11492
11497
|
return;
|
|
11493
11498
|
}
|
|
11494
11499
|
resolve4(done);
|
|
11495
|
-
}
|
|
11500
|
+
};
|
|
11501
|
+
if (sofficePath) {
|
|
11502
|
+
libreConvertWithOptions(buffer, targetExt, void 0, { sofficeBinaryPaths: [sofficePath] }, cb);
|
|
11503
|
+
} else {
|
|
11504
|
+
libreConvert(buffer, targetExt, void 0, cb);
|
|
11505
|
+
}
|
|
11496
11506
|
});
|
|
11497
11507
|
}
|
|
11498
11508
|
|