kordoc 4.0.4 → 4.0.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/{-Q4ZCVQFI.js → -QVHGOOCR.js} +7 -7
- package/dist/{chunk-KA5AN73R.js → chunk-6BABRVOJ.js} +2 -2
- package/dist/{chunk-ZJXR4PWY.js → chunk-6PED5OOG.js} +5 -4
- package/dist/{chunk-ZJXR4PWY.js.map → chunk-6PED5OOG.js.map} +1 -1
- package/dist/{chunk-NIW7CZYX.cjs → chunk-6R5FY47W.cjs} +5 -4
- package/dist/chunk-6R5FY47W.cjs.map +1 -0
- package/dist/{chunk-TXNRIVWA.js → chunk-6WDPB4SN.js} +3 -3
- package/dist/{chunk-KSVLQ5BC.js → chunk-FKK4K53F.js} +5 -4
- package/dist/{chunk-KSVLQ5BC.js.map → chunk-FKK4K53F.js.map} +1 -1
- package/dist/{chunk-S3KGEEBQ.js → chunk-OMERK4AW.js} +3 -3
- package/dist/{chunk-DKMKJMR6.js → chunk-QK2G34WE.js} +2 -2
- package/dist/{chunk-MLNHZN32.js → chunk-Z6Q3YG22.js} +58 -15
- package/dist/chunk-Z6Q3YG22.js.map +1 -0
- package/dist/{chunk-2RIOXYGA.js → chunk-ZGMMLYAL.js} +2 -2
- package/dist/cli.js +13 -13
- package/dist/index.cjs +406 -363
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +53 -10
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +10 -10
- package/dist/{parser-2ZUTCU2G.cjs → parser-2V5SPTU7.cjs} +14 -14
- package/dist/{parser-2ZUTCU2G.cjs.map → parser-2V5SPTU7.cjs.map} +1 -1
- package/dist/{parser-46JGSTPR.js → parser-3MAYZUJX.js} +3 -3
- package/dist/{parser-TLCC67W6.js → parser-YSHZC5FQ.js} +2 -2
- package/dist/{profile-io-MRVIJ5T4.js → profile-io-3EECPDHG.js} +3 -3
- package/dist/render-MJSQ4TG2.js +10 -0
- package/dist/seal-R3POFNOU.js +10 -0
- package/dist/{watch-NZNVJ4YD.js → watch-7MHSCKEQ.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-MLNHZN32.js.map +0 -1
- package/dist/chunk-NIW7CZYX.cjs.map +0 -1
- package/dist/render-TTOG6CHW.js +0 -10
- package/dist/seal-NMLZ3M3K.js +0 -10
- /package/dist/{-Q4ZCVQFI.js.map → -QVHGOOCR.js.map} +0 -0
- /package/dist/{chunk-KA5AN73R.js.map → chunk-6BABRVOJ.js.map} +0 -0
- /package/dist/{chunk-TXNRIVWA.js.map → chunk-6WDPB4SN.js.map} +0 -0
- /package/dist/{chunk-S3KGEEBQ.js.map → chunk-OMERK4AW.js.map} +0 -0
- /package/dist/{chunk-DKMKJMR6.js.map → chunk-QK2G34WE.js.map} +0 -0
- /package/dist/{chunk-2RIOXYGA.js.map → chunk-ZGMMLYAL.js.map} +0 -0
- /package/dist/{parser-46JGSTPR.js.map → parser-3MAYZUJX.js.map} +0 -0
- /package/dist/{parser-TLCC67W6.js.map → parser-YSHZC5FQ.js.map} +0 -0
- /package/dist/{profile-io-MRVIJ5T4.js.map → profile-io-3EECPDHG.js.map} +0 -0
- /package/dist/{render-TTOG6CHW.js.map → render-MJSQ4TG2.js.map} +0 -0
- /package/dist/{seal-NMLZ3M3K.js.map → seal-R3POFNOU.js.map} +0 -0
- /package/dist/{watch-NZNVJ4YD.js.map → watch-7MHSCKEQ.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
KordocError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6BABRVOJ.js";
|
|
5
5
|
|
|
6
6
|
// src/hwpx/profile-io.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -89,4 +89,4 @@ export {
|
|
|
89
89
|
formatProfileSchema,
|
|
90
90
|
parseFormatProfileJson
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-ZGMMLYAL.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseFormatProfileJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZGMMLYAL.js";
|
|
5
5
|
import {
|
|
6
6
|
BODY_FONTS,
|
|
7
7
|
BULLET2_CHARS,
|
|
@@ -20,23 +20,23 @@ import {
|
|
|
20
20
|
markdownToHwpx,
|
|
21
21
|
parse,
|
|
22
22
|
unknownFontWarnings
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Z6Q3YG22.js";
|
|
24
24
|
import {
|
|
25
25
|
blocksToMarkdown
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6PED5OOG.js";
|
|
27
27
|
import {
|
|
28
28
|
detectFormat,
|
|
29
29
|
detectZipFormat
|
|
30
30
|
} from "./chunk-MEPHGCPQ.js";
|
|
31
31
|
import "./chunk-MOL7MDBG.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-6WDPB4SN.js";
|
|
33
|
+
import "./chunk-OMERK4AW.js";
|
|
34
|
+
import "./chunk-QK2G34WE.js";
|
|
35
35
|
import {
|
|
36
36
|
VERSION,
|
|
37
37
|
sanitizeError,
|
|
38
38
|
toArrayBuffer
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-6BABRVOJ.js";
|
|
40
40
|
|
|
41
41
|
// src/cli.ts
|
|
42
42
|
import { readFileSync, writeFileSync, mkdirSync, statSync } from "fs";
|
|
@@ -144,7 +144,7 @@ program.command("watch <dir>").description("\uB514\uB809\uD1A0\uB9AC \uAC10\uC2D
|
|
|
144
144
|
if (command.getOptionValueSource("format") === "default" && program.getOptionValueSource("format") === "cli") {
|
|
145
145
|
opts.format = rootOpts.format;
|
|
146
146
|
}
|
|
147
|
-
const { watchDirectory } = await import("./watch-
|
|
147
|
+
const { watchDirectory } = await import("./watch-7MHSCKEQ.js");
|
|
148
148
|
await watchDirectory({
|
|
149
149
|
dir,
|
|
150
150
|
outDir: opts.outDir,
|
|
@@ -301,7 +301,7 @@ program.command("fill <template>").description("\uC11C\uC2DD \uBB38\uC11C\uC758
|
|
|
301
301
|
});
|
|
302
302
|
program.command("seal <file>").description('\uB3C4\uC7A5/\uC11C\uBA85 \uC774\uBBF8\uC9C0\uB97C \uC575\uCEE4 \uBB38\uAD6C \uC704\uC5D0 \uBD80\uC720 \uBC30\uCE58 (\uD45C/\uD398\uC774\uC9C0 \uBD88\uD655\uC7A5) \u2014 kordoc seal \uC2E0\uCCAD\uC11C.hwpx --image \uB3C4\uC7A5.png --anchor "(\uC778)" -o \uACB0\uACFC.hwpx').requiredOption("--image <path>", "\uB3C4\uC7A5/\uC11C\uBA85 \uC774\uBBF8\uC9C0 (\uD22C\uBA85 \uBC30\uACBD PNG \uAD8C\uC7A5)").option("--anchor <text>", "\uC575\uCEE4 \uBB38\uAD6C", "(\uC778)").option("-n, --occurrence <num>", "\uAC19\uC740 \uC575\uCEE4\uAC00 \uC5EC\uB7FF\uC77C \uB54C 0-based \uC120\uD0DD", "0").option("--size-mm <num>", "\uB3C4\uC7A5 \uD55C \uBCC0 \uD06C\uAE30 mm (\uAE30\uBCF8: \uC904\uB192\uC774\xD71.6, 7~18 \uD074\uB7A8\uD504)").option("--mode <mode>", "overlap(\uBB38\uAD6C \uC704 \uACB9\uCE68) | right(\uC624\uB978\uCABD \uC606) | auto", "auto").option("--dx <mm>", "x \uBBF8\uC138\uC870\uC815 mm", "0").option("--dy <mm>", "y \uBBF8\uC138\uC870\uC815 mm", "0").option("-o, --output <path>", "\uCD9C\uB825 \uACBD\uB85C (\uAE30\uBCF8: <\uC785\uB825>.sealed.hwpx)").option("--silent", "\uC9C4\uD589 \uBA54\uC2DC\uC9C0 \uC228\uAE30\uAE30").action(async (file, opts) => {
|
|
303
303
|
try {
|
|
304
|
-
const { placeSealHwpx, detectFormat: detectFormat2 } = await import("./-
|
|
304
|
+
const { placeSealHwpx, detectFormat: detectFormat2 } = await import("./-QVHGOOCR.js");
|
|
305
305
|
const rootOpts = program.opts();
|
|
306
306
|
const output = opts.output ?? rootOpts.output;
|
|
307
307
|
const silent = opts.silent ?? rootOpts.silent;
|
|
@@ -379,7 +379,7 @@ program.command("seal <file>").description('\uB3C4\uC7A5/\uC11C\uBA85 \uC774\uBB
|
|
|
379
379
|
});
|
|
380
380
|
program.command("patch <original> <edited>").description("\uC11C\uC2DD \uBCF4\uC874 \uB77C\uC6B4\uB4DC\uD2B8\uB9BD \uD328\uCE58 \u2014 \uD3B8\uC9D1\uB41C \uB9C8\uD06C\uB2E4\uC6B4\uC744 \uC6D0\uBCF8 HWPX/HWP\uC5D0 in-place \uBC18\uC601 (kordoc patch \uC6D0\uBCF8.hwpx \uD3B8\uC9D1.md -o \uCD9C\uB825.hwpx)").option("-o, --output <path>", "\uCD9C\uB825 \uACBD\uB85C (\uAE30\uBCF8: <\uC6D0\uBCF8>.patched.hwpx|.hwp)").option("--no-verify", "\uD328\uCE58 \uD6C4 \uC7AC\uD30C\uC2F1 \uC790\uB3D9 \uAC80\uC99D \uC0DD\uB7B5").option("--silent", "\uC9C4\uD589 \uBA54\uC2DC\uC9C0 \uC228\uAE30\uAE30").action(async (original, edited, opts) => {
|
|
381
381
|
try {
|
|
382
|
-
const { patchHwpx, patchHwp, detectFormat: detectFormat2 } = await import("./-
|
|
382
|
+
const { patchHwpx, patchHwp, detectFormat: detectFormat2 } = await import("./-QVHGOOCR.js");
|
|
383
383
|
const rootOpts = program.opts();
|
|
384
384
|
const output = opts.output ?? rootOpts.output;
|
|
385
385
|
const silent = opts.silent ?? rootOpts.silent;
|
|
@@ -420,7 +420,7 @@ program.command("patch <original> <edited>").description("\uC11C\uC2DD \uBCF4\uC
|
|
|
420
420
|
});
|
|
421
421
|
program.command("validate <file>").description("HWPX \uAD6C\uC870 \uAC80\uC99D \u2014 ZIP\xB7mimetype\xB7\uD544\uC218 \uD30C\uC77C\xB7XML \uC6F0\uD3FC\uB4DC\xB7secCnt\xB7manifest \uCC38\uC870 (\uD55C\uCEF4\uB3C5\uC2A4 \uAC70\uBD80 \uC694\uC778 \uC0AC\uC804 \uCC28\uB2E8)").option("--json", "\uACB0\uACFC\uB97C JSON\uC73C\uB85C stdout\uC5D0 \uCD9C\uB825").action(async (file, opts) => {
|
|
422
422
|
try {
|
|
423
|
-
const { validateHwpx } = await import("./-
|
|
423
|
+
const { validateHwpx } = await import("./-QVHGOOCR.js");
|
|
424
424
|
const buf = new Uint8Array(readFileSync(resolve(file)));
|
|
425
425
|
const result = await validateHwpx(buf);
|
|
426
426
|
if (opts.json) {
|
|
@@ -603,7 +603,7 @@ program.command("render <file>").description("\uB808\uC774\uC544\uC6C3 \uBCF4\uC
|
|
|
603
603
|
const rootOpts = program.opts();
|
|
604
604
|
const output = opts.output ?? rootOpts.output;
|
|
605
605
|
const silent = opts.silent ?? rootOpts.silent;
|
|
606
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
606
|
+
const { renderHwpxToSvg } = await import("./render-MJSQ4TG2.js");
|
|
607
607
|
const absPath = resolve(file);
|
|
608
608
|
const buffer = readFileSync(absPath);
|
|
609
609
|
const highlights = opts.highlight ? String(opts.highlight).split(",") : void 0;
|
|
@@ -625,7 +625,7 @@ program.command("render <file>").description("\uB808\uC774\uC544\uC6C3 \uBCF4\uC
|
|
|
625
625
|
});
|
|
626
626
|
program.command("render-worker").description("persistent \uB80C\uB354 \uC6CC\uCEE4 \u2014 stdin NDJSON \uC694\uCCAD \u2192 \uC870\uD310 SVG \uD30C\uC77C \uCD9C\uB825 (\uD504\uB85C\uC138\uC2A4 \uC720\uC9C0, \uCF5C\uB4DC\uC2A4\uD0C0\uD2B8 \uC81C\uAC70)").action(async () => {
|
|
627
627
|
const { createInterface } = await import("readline");
|
|
628
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
628
|
+
const { renderHwpxToSvg } = await import("./render-MJSQ4TG2.js");
|
|
629
629
|
const rl = createInterface({ input: process.stdin });
|
|
630
630
|
const write = (o) => void process.stdout.write(JSON.stringify(o) + "\n");
|
|
631
631
|
write({ ready: true, version: VERSION });
|