@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/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
markdownToHwpx,
|
|
6
6
|
markdownToXlsx,
|
|
7
7
|
parse
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EJZO6DUI.js";
|
|
9
9
|
import {
|
|
10
10
|
VERSION,
|
|
11
11
|
toArrayBuffer
|
|
@@ -369,7 +369,7 @@ program.command("init-env").description("kordoc\uC6A9 .env \uD15C\uD50C\uB9BF \u
|
|
|
369
369
|
}
|
|
370
370
|
});
|
|
371
371
|
program.command("watch <dir>").description("\uB514\uB809\uD1A0\uB9AC \uAC10\uC2DC \u2014 \uC0C8 \uBB38\uC11C \uC790\uB3D9 \uBCC0\uD658").option("--webhook <url>", "\uACB0\uACFC \uC804\uC1A1 \uC6F9\uD6C5 URL").option("-d, --out-dir <dir>", "\uBCC0\uD658 \uACB0\uACFC \uCD9C\uB825 \uB514\uB809\uD1A0\uB9AC").option("-p, --pages <range>", "\uD398\uC774\uC9C0/\uC139\uC158 \uBC94\uC704").option("--format <type>", "\uCD9C\uB825 \uD615\uC2DD: markdown \uB610\uB294 json", "markdown").option("--silent", "\uC9C4\uD589 \uBA54\uC2DC\uC9C0 \uC228\uAE30\uAE30").action(async (dir, opts) => {
|
|
372
|
-
const { watchDirectory } = await import("./watch-
|
|
372
|
+
const { watchDirectory } = await import("./watch-CVSZKJE3.js");
|
|
373
373
|
await watchDirectory({
|
|
374
374
|
dir,
|
|
375
375
|
outDir: opts.outDir,
|
package/dist/index.cjs
CHANGED
|
@@ -11368,8 +11368,13 @@ async function installForPlatform(pkg, onProgress) {
|
|
|
11368
11368
|
async function installMacOS(pkg, downloadPath) {
|
|
11369
11369
|
const mountPoint = `/Volumes/LibreOffice_${Date.now()}`;
|
|
11370
11370
|
await new Promise((resolve4, reject) => {
|
|
11371
|
-
const
|
|
11372
|
-
child.
|
|
11371
|
+
const stderr = [];
|
|
11372
|
+
const child = (0, import_child_process4.spawn)("hdiutil", ["attach", "-nobrowse", "-noverify", "-mountpoint", mountPoint, downloadPath]);
|
|
11373
|
+
child.stderr?.on("data", (d) => stderr.push(d.toString()));
|
|
11374
|
+
child.on(
|
|
11375
|
+
"close",
|
|
11376
|
+
(code) => code === 0 ? resolve4() : reject(new Error(`dmg \uB9C8\uC6B4\uD2B8 \uC2E4\uD328 (code=${code}): ${stderr.join("").trim()}`))
|
|
11377
|
+
);
|
|
11373
11378
|
});
|
|
11374
11379
|
try {
|
|
11375
11380
|
const appSource = (0, import_path5.join)(mountPoint, "LibreOffice.app");
|
|
@@ -11497,6 +11502,7 @@ async function resolveSoffice(emitter, autoInstall = true) {
|
|
|
11497
11502
|
|
|
11498
11503
|
// src/convert/libreoffice.ts
|
|
11499
11504
|
var libreConvert = import_libreoffice_convert.default.convert;
|
|
11505
|
+
var libreConvertWithOptions = import_libreoffice_convert.default.convertWithOptions;
|
|
11500
11506
|
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
11501
11507
|
return new Promise((resolve4, reject) => {
|
|
11502
11508
|
const timer = setTimeout(() => {
|
|
@@ -11504,8 +11510,7 @@ async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
|
11504
11510
|
new ConvertError("TIMEOUT", `\uBCC0\uD658 \uD0C0\uC784\uC544\uC6C3 (${timeoutMs}ms \uCD08\uACFC)`)
|
|
11505
11511
|
);
|
|
11506
11512
|
}, timeoutMs);
|
|
11507
|
-
const
|
|
11508
|
-
libreConvert(buffer, targetExt, opts, (err, done) => {
|
|
11513
|
+
const cb = (err, done) => {
|
|
11509
11514
|
clearTimeout(timer);
|
|
11510
11515
|
if (err || !done) {
|
|
11511
11516
|
reject(
|
|
@@ -11517,7 +11522,12 @@ async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
|
11517
11522
|
return;
|
|
11518
11523
|
}
|
|
11519
11524
|
resolve4(done);
|
|
11520
|
-
}
|
|
11525
|
+
};
|
|
11526
|
+
if (sofficePath) {
|
|
11527
|
+
libreConvertWithOptions(buffer, targetExt, void 0, { sofficeBinaryPaths: [sofficePath] }, cb);
|
|
11528
|
+
} else {
|
|
11529
|
+
libreConvert(buffer, targetExt, void 0, cb);
|
|
11530
|
+
}
|
|
11521
11531
|
});
|
|
11522
11532
|
}
|
|
11523
11533
|
|