@clazic/kordoc 2.7.2 → 2.7.3
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-WMQBWE6H.js → chunk-CIR4TB4K.js} +2 -2
- package/dist/{chunk-OF2YI3AC.js → chunk-WE7MWE73.js} +6 -5
- package/dist/{chunk-OF2YI3AC.js.map → chunk-WE7MWE73.js.map} +1 -1
- package/dist/cli.js +6 -6
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{utils-CJPB6YNH.js → utils-LYW4Z2Z6.js} +2 -2
- package/dist/{watch-MMYT64UO.js → watch-A4DEF4GF.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-WMQBWE6H.js.map → chunk-CIR4TB4K.js.map} +0 -0
- /package/dist/{utils-CJPB6YNH.js.map → utils-LYW4Z2Z6.js.map} +0 -0
- /package/dist/{watch-MMYT64UO.js.map → watch-A4DEF4GF.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
|
-
var VERSION = true ? "2.7.
|
|
4
|
+
var VERSION = true ? "2.7.3" : "0.0.0-dev";
|
|
5
5
|
function toArrayBuffer(buf) {
|
|
6
6
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
7
7
|
return buf.buffer;
|
|
@@ -105,4 +105,4 @@ export {
|
|
|
105
105
|
classifyError,
|
|
106
106
|
normalizeKordocError
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-CIR4TB4K.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
precheckZipSize,
|
|
8
8
|
sanitizeHref,
|
|
9
9
|
toArrayBuffer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CIR4TB4K.js";
|
|
11
11
|
import {
|
|
12
12
|
parsePageRange
|
|
13
13
|
} from "./chunk-MOL7MDBG.js";
|
|
@@ -10085,14 +10085,15 @@ async function resolveSoffice(emitter, autoInstall = true) {
|
|
|
10085
10085
|
|
|
10086
10086
|
// src/convert/libreoffice.ts
|
|
10087
10087
|
var libreConvert = libre.convert;
|
|
10088
|
-
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4) {
|
|
10088
|
+
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
10089
10089
|
return new Promise((resolve2, reject) => {
|
|
10090
10090
|
const timer = setTimeout(() => {
|
|
10091
10091
|
reject(
|
|
10092
10092
|
new ConvertError("TIMEOUT", `\uBCC0\uD658 \uD0C0\uC784\uC544\uC6C3 (${timeoutMs}ms \uCD08\uACFC)`)
|
|
10093
10093
|
);
|
|
10094
10094
|
}, timeoutMs);
|
|
10095
|
-
|
|
10095
|
+
const opts = sofficePath ? { sofficeBinaryPaths: [sofficePath] } : void 0;
|
|
10096
|
+
libreConvert(buffer, targetExt, opts, (err, done) => {
|
|
10096
10097
|
clearTimeout(timer);
|
|
10097
10098
|
if (err || !done) {
|
|
10098
10099
|
reject(
|
|
@@ -10260,7 +10261,7 @@ async function convertToPdf(input, options) {
|
|
|
10260
10261
|
try {
|
|
10261
10262
|
emitter.convertStart("\uBCC0\uD658 \uC2DC\uC791...");
|
|
10262
10263
|
emitter.progress(10, "\uBCC0\uD658 \uC911...");
|
|
10263
|
-
const pdf = await convertBuffer(buffer, ".pdf", options?.timeoutMs);
|
|
10264
|
+
const pdf = await convertBuffer(buffer, ".pdf", options?.timeoutMs, sofficePath);
|
|
10264
10265
|
emitter.progress(100, "\uBCC0\uD658 \uC644\uB8CC");
|
|
10265
10266
|
emitter.convertDone("\uBCC0\uD658 \uC644\uB8CC");
|
|
10266
10267
|
const result = {
|
|
@@ -10690,4 +10691,4 @@ export {
|
|
|
10690
10691
|
cfb/cfb.js:
|
|
10691
10692
|
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
|
10692
10693
|
*/
|
|
10693
|
-
//# sourceMappingURL=chunk-
|
|
10694
|
+
//# sourceMappingURL=chunk-WE7MWE73.js.map
|