@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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/utils.ts
4
- var VERSION = true ? "2.7.3" : "0.0.0-dev";
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-CIR4TB4K.js.map
108
+ //# sourceMappingURL=chunk-5CIZV5C3.js.map
@@ -7,7 +7,7 @@ import {
7
7
  precheckZipSize,
8
8
  sanitizeHref,
9
9
  toArrayBuffer
10
- } from "./chunk-CIR4TB4K.js";
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
- libreConvertWithOptions(buffer, targetExt, void 0, { sofficeBinaryPaths: [sofficePath] }, cb);
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 pdf = await convertBuffer(buffer, ".pdf", options?.timeoutMs, sofficePath);
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-EJZO6DUI.js.map
10706
+ //# sourceMappingURL=chunk-6DUCYZRR.js.map