@clazic/kordoc 2.7.4 → 2.7.5
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-CIR4TB4K.js → chunk-5CIZV5C3.js} +2 -2
- package/dist/{chunk-EJZO6DUI.js → chunk-6DUCYZRR.js} +7 -5
- package/dist/{chunk-EJZO6DUI.js.map → chunk-6DUCYZRR.js.map} +1 -1
- package/dist/cli.js +6 -6
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/{utils-LYW4Z2Z6.js → utils-NR7YWMWB.js} +2 -2
- package/dist/{watch-CVSZKJE3.js → watch-LDX5GPEE.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-CIR4TB4K.js.map → chunk-5CIZV5C3.js.map} +0 -0
- /package/dist/{utils-LYW4Z2Z6.js.map → utils-NR7YWMWB.js.map} +0 -0
- /package/dist/{watch-CVSZKJE3.js.map → watch-LDX5GPEE.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.4" : "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-5CIZV5C3.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
precheckZipSize,
|
|
8
8
|
sanitizeHref,
|
|
9
9
|
toArrayBuffer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5CIZV5C3.js";
|
|
11
11
|
import {
|
|
12
12
|
parsePageRange
|
|
13
13
|
} from "./chunk-MOL7MDBG.js";
|
|
@@ -10091,7 +10091,7 @@ async function resolveSoffice(emitter, autoInstall = true) {
|
|
|
10091
10091
|
// src/convert/libreoffice.ts
|
|
10092
10092
|
var libreConvert = libre.convert;
|
|
10093
10093
|
var libreConvertWithOptions = libre.convertWithOptions;
|
|
10094
|
-
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
10094
|
+
async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath, sourceExt) {
|
|
10095
10095
|
return new Promise((resolve2, reject) => {
|
|
10096
10096
|
const timer = setTimeout(() => {
|
|
10097
10097
|
reject(
|
|
@@ -10112,7 +10112,8 @@ async function convertBuffer(buffer, targetExt, timeoutMs = 6e4, sofficePath) {
|
|
|
10112
10112
|
resolve2(done);
|
|
10113
10113
|
};
|
|
10114
10114
|
if (sofficePath) {
|
|
10115
|
-
|
|
10115
|
+
const fileName = sourceExt ? `source${sourceExt}` : "source";
|
|
10116
|
+
libreConvertWithOptions(buffer, targetExt, void 0, { sofficeBinaryPaths: [sofficePath], fileName }, cb);
|
|
10116
10117
|
} else {
|
|
10117
10118
|
libreConvert(buffer, targetExt, void 0, cb);
|
|
10118
10119
|
}
|
|
@@ -10271,7 +10272,8 @@ async function convertToPdf(input, options) {
|
|
|
10271
10272
|
try {
|
|
10272
10273
|
emitter.convertStart("\uBCC0\uD658 \uC2DC\uC791...");
|
|
10273
10274
|
emitter.progress(10, "\uBCC0\uD658 \uC911...");
|
|
10274
|
-
const
|
|
10275
|
+
const sourceExt = format === "hwpx" ? ".hwpx" : ".hwp";
|
|
10276
|
+
const pdf = await convertBuffer(buffer, ".pdf", options?.timeoutMs, sofficePath, sourceExt);
|
|
10275
10277
|
emitter.progress(100, "\uBCC0\uD658 \uC644\uB8CC");
|
|
10276
10278
|
emitter.convertDone("\uBCC0\uD658 \uC644\uB8CC");
|
|
10277
10279
|
const result = {
|
|
@@ -10701,4 +10703,4 @@ export {
|
|
|
10701
10703
|
cfb/cfb.js:
|
|
10702
10704
|
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
|
10703
10705
|
*/
|
|
10704
|
-
//# sourceMappingURL=chunk-
|
|
10706
|
+
//# sourceMappingURL=chunk-6DUCYZRR.js.map
|