@notedge/panduck 0.0.0 → 0.0.1
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/bin/{panduck.mjs → panduck} +11 -11
- package/locales/en-US/cli.json +46 -46
- package/locales/locales.json +7 -7
- package/locales/zh-CN/cli.json +46 -46
- package/package.json +29 -34
- package/readme.md +5 -5
- package/src/cli/cli.ts +28 -28
- package/src/cli/commands/check-cmd.ts +174 -174
- package/src/cli/commands/convert-cmd.ts +300 -300
- package/src/cli/commands/doctor-cmd.ts +84 -84
- package/src/cli/commands/formats-cmd.ts +50 -50
- package/src/cli/commands/inspect-cmd.ts +231 -231
- package/src/cli/commands/plan-cmd.ts +188 -188
- package/src/cli/console-backend.ts +16 -16
- package/src/cli/context.ts +98 -98
- package/src/cli/diagnostics.ts +24 -24
- package/src/cli/exit-codes.ts +14 -14
- package/src/cli/format-registry.ts +170 -170
- package/src/cli/index.ts +7 -7
- package/src/cli/main.ts +10 -10
- package/src/cli/options.ts +127 -127
- package/src/cli/paths.ts +57 -56
- package/src/cli/pipeline.ts +225 -225
- package/src/cli/report.ts +110 -110
- package/src/index.ts +8 -8
- package/src/node/index.ts +14 -14
- package/src/node/load.ts +120 -120
- package/src/types.ts +49 -49
- package/src/wasm/index.ts +2 -2
- package/src/wasm/load.ts +23 -23
- package/src/wasm/panduck_wasm.d.ts +6 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { createJiti } from "jiti";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
7
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
const jiti = createJiti(import.meta.url, { interopDefault: true });
|
|
9
|
-
const { runCli } = await jiti.import(join(here, "../src/cli/main.ts"));
|
|
10
|
-
|
|
11
|
-
process.exit(await runCli(process.argv.slice(2)));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createJiti } from "jiti";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const jiti = createJiti(import.meta.url, { interopDefault: true });
|
|
9
|
+
const { runCli } = await jiti.import(join(here, "../src/cli/main.ts"));
|
|
10
|
+
|
|
11
|
+
process.exit(await runCli(process.argv.slice(2)));
|
package/locales/en-US/cli.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli.intro": "panduck — document conversion orchestrator for notedown-ir::DocumentGraph",
|
|
3
|
-
"cli.cmd.convert": "Convert one input document to a target format",
|
|
4
|
-
"cli.cmd.plan": "Probe input and plan a conversion pipeline without writing output",
|
|
5
|
-
"cli.cmd.inspect": "Inspect input format and container structure",
|
|
6
|
-
"cli.cmd.check": "Validate source or generated output against Panduck contracts",
|
|
7
|
-
"cli.cmd.formats": "List format capabilities from the shared registry",
|
|
8
|
-
"cli.cmd.doctor": "Check CLI install, native bindings, and environment",
|
|
9
|
-
"cli.opt.to": "Target format ID (e.g. epub, docx, markdown, notedown)",
|
|
10
|
-
"cli.opt.from": "Source format ID when detection should be skipped",
|
|
11
|
-
"cli.opt.output": "Output file path, or - for stdout",
|
|
12
|
-
"cli.opt.profile": "Named conversion profile from config",
|
|
13
|
-
"cli.opt.config": "Path to Panduck config file",
|
|
14
|
-
"cli.opt.assets-dir": "Output assets root directory",
|
|
15
|
-
"cli.opt.asset-policy": "Asset handling: preserve, copy, embed, or drop",
|
|
16
|
-
"cli.opt.link-policy": "Link handling: preserve, rewrite, or drop",
|
|
17
|
-
"cli.opt.loss": "Loss policy: allow, warn, or deny",
|
|
18
|
-
"cli.opt.strict": "Reject unknown coverage in addition to loss",
|
|
19
|
-
"cli.opt.allow-partial": "Allow publishing partial source reads when the writer accepts them",
|
|
20
|
-
"cli.opt.diagnostics": "Diagnostics channel: silent, human, or json",
|
|
21
|
-
"cli.opt.batch": "Process multiple inputs independently",
|
|
22
|
-
"cli.opt.output-dir": "Batch output directory",
|
|
23
|
-
"cli.opt.report": "Write JSON report to a file, or - for stdout",
|
|
24
|
-
"cli.opt.overwrite": "Replace an existing output file",
|
|
25
|
-
"cli.opt.budget": "Parse budget limit (repeatable KEY=VALUE)",
|
|
26
|
-
"cli.opt.dry-run": "Alias for plan-style validation on convert",
|
|
27
|
-
"cli.opt.stage": "Inspect depth: probe, index, decode, or validate",
|
|
28
|
-
"cli.opt.path": "Layout path inside a container (inspect)",
|
|
29
|
-
"cli.opt.operation": "Filter formats by read or write operation",
|
|
30
|
-
"cli.opt.json": "Emit machine-readable JSON on stdout",
|
|
31
|
-
"cli.opt.log-file": "Append structured console events to a JSON lines log file",
|
|
32
|
-
"cli.err.same_path": "Input and output paths must not be the same: {path}",
|
|
33
|
-
"cli.err.missing_to_stdout": "Writing to stdout requires an explicit --to format",
|
|
34
|
-
"cli.err.missing_input": "Input path is required",
|
|
35
|
-
"cli.err.stdin_batch": "Standard input cannot be used with --batch",
|
|
36
|
-
"cli.err.ambiguous_format": "Ambiguous input format; specify --from explicitly",
|
|
37
|
-
"cli.err.unsupported_target": "Target format {format} is not ready for {operation}",
|
|
38
|
-
"cli.err.unsupported_source": "Source format {format} is not ready for read",
|
|
39
|
-
"cli.err.output_exists": "Output already exists; pass --overwrite to replace it",
|
|
40
|
-
"cli.err.not_implemented": "Pipeline step not implemented yet: {step}",
|
|
41
|
-
"cli.err.invalid_policy": "Invalid {name}: {value}",
|
|
42
|
-
"cli.msg.plan_ready": "Plan complete",
|
|
43
|
-
"cli.msg.convert_blocked": "Conversion blocked by capability registry",
|
|
44
|
-
"cli.msg.doctor_ok": "Panduck environment looks healthy",
|
|
45
|
-
"cli.msg.doctor_issues": "Panduck environment has issues"
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"cli.intro": "panduck — document conversion orchestrator for notedown-ir::DocumentGraph",
|
|
3
|
+
"cli.cmd.convert": "Convert one input document to a target format",
|
|
4
|
+
"cli.cmd.plan": "Probe input and plan a conversion pipeline without writing output",
|
|
5
|
+
"cli.cmd.inspect": "Inspect input format and container structure",
|
|
6
|
+
"cli.cmd.check": "Validate source or generated output against Panduck contracts",
|
|
7
|
+
"cli.cmd.formats": "List format capabilities from the shared registry",
|
|
8
|
+
"cli.cmd.doctor": "Check CLI install, native bindings, and environment",
|
|
9
|
+
"cli.opt.to": "Target format ID (e.g. epub, docx, markdown, notedown)",
|
|
10
|
+
"cli.opt.from": "Source format ID when detection should be skipped",
|
|
11
|
+
"cli.opt.output": "Output file path, or - for stdout",
|
|
12
|
+
"cli.opt.profile": "Named conversion profile from config",
|
|
13
|
+
"cli.opt.config": "Path to Panduck config file",
|
|
14
|
+
"cli.opt.assets-dir": "Output assets root directory",
|
|
15
|
+
"cli.opt.asset-policy": "Asset handling: preserve, copy, embed, or drop",
|
|
16
|
+
"cli.opt.link-policy": "Link handling: preserve, rewrite, or drop",
|
|
17
|
+
"cli.opt.loss": "Loss policy: allow, warn, or deny",
|
|
18
|
+
"cli.opt.strict": "Reject unknown coverage in addition to loss",
|
|
19
|
+
"cli.opt.allow-partial": "Allow publishing partial source reads when the writer accepts them",
|
|
20
|
+
"cli.opt.diagnostics": "Diagnostics channel: silent, human, or json",
|
|
21
|
+
"cli.opt.batch": "Process multiple inputs independently",
|
|
22
|
+
"cli.opt.output-dir": "Batch output directory",
|
|
23
|
+
"cli.opt.report": "Write JSON report to a file, or - for stdout",
|
|
24
|
+
"cli.opt.overwrite": "Replace an existing output file",
|
|
25
|
+
"cli.opt.budget": "Parse budget limit (repeatable KEY=VALUE)",
|
|
26
|
+
"cli.opt.dry-run": "Alias for plan-style validation on convert",
|
|
27
|
+
"cli.opt.stage": "Inspect depth: probe, index, decode, or validate",
|
|
28
|
+
"cli.opt.path": "Layout path inside a container (inspect)",
|
|
29
|
+
"cli.opt.operation": "Filter formats by read or write operation",
|
|
30
|
+
"cli.opt.json": "Emit machine-readable JSON on stdout",
|
|
31
|
+
"cli.opt.log-file": "Append structured console events to a JSON lines log file",
|
|
32
|
+
"cli.err.same_path": "Input and output paths must not be the same: {path}",
|
|
33
|
+
"cli.err.missing_to_stdout": "Writing to stdout requires an explicit --to format",
|
|
34
|
+
"cli.err.missing_input": "Input path is required",
|
|
35
|
+
"cli.err.stdin_batch": "Standard input cannot be used with --batch",
|
|
36
|
+
"cli.err.ambiguous_format": "Ambiguous input format; specify --from explicitly",
|
|
37
|
+
"cli.err.unsupported_target": "Target format {format} is not ready for {operation}",
|
|
38
|
+
"cli.err.unsupported_source": "Source format {format} is not ready for read",
|
|
39
|
+
"cli.err.output_exists": "Output already exists; pass --overwrite to replace it",
|
|
40
|
+
"cli.err.not_implemented": "Pipeline step not implemented yet: {step}",
|
|
41
|
+
"cli.err.invalid_policy": "Invalid {name}: {value}",
|
|
42
|
+
"cli.msg.plan_ready": "Plan complete",
|
|
43
|
+
"cli.msg.convert_blocked": "Conversion blocked by capability registry",
|
|
44
|
+
"cli.msg.doctor_ok": "Panduck environment looks healthy",
|
|
45
|
+
"cli.msg.doctor_issues": "Panduck environment has issues"
|
|
46
|
+
}
|
package/locales/locales.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultLocale": "en-US",
|
|
3
|
-
"locales": [
|
|
4
|
-
{ "id": "en-US", "label": "English", "direction": "ltr" },
|
|
5
|
-
{ "id": "zh-CN", "label": "简体中文", "direction": "ltr" }
|
|
6
|
-
]
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"defaultLocale": "en-US",
|
|
3
|
+
"locales": [
|
|
4
|
+
{ "id": "en-US", "label": "English", "direction": "ltr" },
|
|
5
|
+
{ "id": "zh-CN", "label": "简体中文", "direction": "ltr" }
|
|
6
|
+
]
|
|
7
|
+
}
|
package/locales/zh-CN/cli.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli.intro": "panduck — 面向 notedown-ir::DocumentGraph 的文档转换编排器",
|
|
3
|
-
"cli.cmd.convert": "将单个输入文档转换为目标格式",
|
|
4
|
-
"cli.cmd.plan": "探测输入并规划转换流水线,不写输出",
|
|
5
|
-
"cli.cmd.inspect": "查看输入格式与容器结构",
|
|
6
|
-
"cli.cmd.check": "按 Panduck 合同校验源文件或已生成输出",
|
|
7
|
-
"cli.cmd.formats": "列出共享注册表中的格式能力",
|
|
8
|
-
"cli.cmd.doctor": "检查 CLI 安装、原生绑定与环境",
|
|
9
|
-
"cli.opt.to": "目标格式 ID(如 epub、docx、markdown、notedown)",
|
|
10
|
-
"cli.opt.from": "在跳过自动探测时指定源格式 ID",
|
|
11
|
-
"cli.opt.output": "输出文件路径,或 - 表示标准输出",
|
|
12
|
-
"cli.opt.profile": "配置中的命名转换 profile",
|
|
13
|
-
"cli.opt.config": "Panduck 配置文件路径",
|
|
14
|
-
"cli.opt.assets-dir": "输出资产根目录",
|
|
15
|
-
"cli.opt.asset-policy": "资产策略:preserve、copy、embed 或 drop",
|
|
16
|
-
"cli.opt.link-policy": "链接策略:preserve、rewrite 或 drop",
|
|
17
|
-
"cli.opt.loss": "损失策略:allow、warn 或 deny",
|
|
18
|
-
"cli.opt.strict": "除损失外还拒绝 unknown coverage",
|
|
19
|
-
"cli.opt.allow-partial": "在 writer 接受时允许发布 partial 源读取",
|
|
20
|
-
"cli.opt.diagnostics": "诊断通道:silent、human 或 json",
|
|
21
|
-
"cli.opt.batch": "独立处理多个输入",
|
|
22
|
-
"cli.opt.output-dir": "批处理输出目录",
|
|
23
|
-
"cli.opt.report": "将 JSON 报告写入文件,或 - 表示标准输出",
|
|
24
|
-
"cli.opt.overwrite": "覆盖已存在的输出文件",
|
|
25
|
-
"cli.opt.budget": "解析预算上限(可重复 KEY=VALUE)",
|
|
26
|
-
"cli.opt.dry-run": "在 convert 上等价于 plan 式校验",
|
|
27
|
-
"cli.opt.stage": "inspect 深度:probe、index、decode 或 validate",
|
|
28
|
-
"cli.opt.path": "容器内布局路径(inspect)",
|
|
29
|
-
"cli.opt.operation": "按 read 或 write 过滤格式",
|
|
30
|
-
"cli.opt.json": "在标准输出打印机器可读 JSON",
|
|
31
|
-
"cli.opt.log-file": "将结构化 console 事件追加写入 JSON lines 日志文件",
|
|
32
|
-
"cli.err.same_path": "输入与输出路径不能相同:{path}",
|
|
33
|
-
"cli.err.missing_to_stdout": "写入标准输出时必须显式指定 --to 格式",
|
|
34
|
-
"cli.err.missing_input": "必须提供输入路径",
|
|
35
|
-
"cli.err.stdin_batch": "标准输入不能与 --batch 同时使用",
|
|
36
|
-
"cli.err.ambiguous_format": "输入格式存在歧义,请显式指定 --from",
|
|
37
|
-
"cli.err.unsupported_target": "目标格式 {format} 尚未就绪,无法 {operation}",
|
|
38
|
-
"cli.err.unsupported_source": "源格式 {format} 尚未就绪,无法读取",
|
|
39
|
-
"cli.err.output_exists": "输出已存在,请使用 --overwrite 覆盖",
|
|
40
|
-
"cli.err.not_implemented": "流水线步骤尚未实现:{step}",
|
|
41
|
-
"cli.err.invalid_policy": "无效的 {name}:{value}",
|
|
42
|
-
"cli.msg.plan_ready": "规划完成",
|
|
43
|
-
"cli.msg.convert_blocked": "能力注册表阻止了转换",
|
|
44
|
-
"cli.msg.doctor_ok": "Panduck 环境正常",
|
|
45
|
-
"cli.msg.doctor_issues": "Panduck 环境存在问题"
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"cli.intro": "panduck — 面向 notedown-ir::DocumentGraph 的文档转换编排器",
|
|
3
|
+
"cli.cmd.convert": "将单个输入文档转换为目标格式",
|
|
4
|
+
"cli.cmd.plan": "探测输入并规划转换流水线,不写输出",
|
|
5
|
+
"cli.cmd.inspect": "查看输入格式与容器结构",
|
|
6
|
+
"cli.cmd.check": "按 Panduck 合同校验源文件或已生成输出",
|
|
7
|
+
"cli.cmd.formats": "列出共享注册表中的格式能力",
|
|
8
|
+
"cli.cmd.doctor": "检查 CLI 安装、原生绑定与环境",
|
|
9
|
+
"cli.opt.to": "目标格式 ID(如 epub、docx、markdown、notedown)",
|
|
10
|
+
"cli.opt.from": "在跳过自动探测时指定源格式 ID",
|
|
11
|
+
"cli.opt.output": "输出文件路径,或 - 表示标准输出",
|
|
12
|
+
"cli.opt.profile": "配置中的命名转换 profile",
|
|
13
|
+
"cli.opt.config": "Panduck 配置文件路径",
|
|
14
|
+
"cli.opt.assets-dir": "输出资产根目录",
|
|
15
|
+
"cli.opt.asset-policy": "资产策略:preserve、copy、embed 或 drop",
|
|
16
|
+
"cli.opt.link-policy": "链接策略:preserve、rewrite 或 drop",
|
|
17
|
+
"cli.opt.loss": "损失策略:allow、warn 或 deny",
|
|
18
|
+
"cli.opt.strict": "除损失外还拒绝 unknown coverage",
|
|
19
|
+
"cli.opt.allow-partial": "在 writer 接受时允许发布 partial 源读取",
|
|
20
|
+
"cli.opt.diagnostics": "诊断通道:silent、human 或 json",
|
|
21
|
+
"cli.opt.batch": "独立处理多个输入",
|
|
22
|
+
"cli.opt.output-dir": "批处理输出目录",
|
|
23
|
+
"cli.opt.report": "将 JSON 报告写入文件,或 - 表示标准输出",
|
|
24
|
+
"cli.opt.overwrite": "覆盖已存在的输出文件",
|
|
25
|
+
"cli.opt.budget": "解析预算上限(可重复 KEY=VALUE)",
|
|
26
|
+
"cli.opt.dry-run": "在 convert 上等价于 plan 式校验",
|
|
27
|
+
"cli.opt.stage": "inspect 深度:probe、index、decode 或 validate",
|
|
28
|
+
"cli.opt.path": "容器内布局路径(inspect)",
|
|
29
|
+
"cli.opt.operation": "按 read 或 write 过滤格式",
|
|
30
|
+
"cli.opt.json": "在标准输出打印机器可读 JSON",
|
|
31
|
+
"cli.opt.log-file": "将结构化 console 事件追加写入 JSON lines 日志文件",
|
|
32
|
+
"cli.err.same_path": "输入与输出路径不能相同:{path}",
|
|
33
|
+
"cli.err.missing_to_stdout": "写入标准输出时必须显式指定 --to 格式",
|
|
34
|
+
"cli.err.missing_input": "必须提供输入路径",
|
|
35
|
+
"cli.err.stdin_batch": "标准输入不能与 --batch 同时使用",
|
|
36
|
+
"cli.err.ambiguous_format": "输入格式存在歧义,请显式指定 --from",
|
|
37
|
+
"cli.err.unsupported_target": "目标格式 {format} 尚未就绪,无法 {operation}",
|
|
38
|
+
"cli.err.unsupported_source": "源格式 {format} 尚未就绪,无法读取",
|
|
39
|
+
"cli.err.output_exists": "输出已存在,请使用 --overwrite 覆盖",
|
|
40
|
+
"cli.err.not_implemented": "流水线步骤尚未实现:{step}",
|
|
41
|
+
"cli.err.invalid_policy": "无效的 {name}:{value}",
|
|
42
|
+
"cli.msg.plan_ready": "规划完成",
|
|
43
|
+
"cli.msg.convert_blocked": "能力注册表阻止了转换",
|
|
44
|
+
"cli.msg.doctor_ok": "Panduck 环境正常",
|
|
45
|
+
"cli.msg.doctor_issues": "Panduck 环境存在问题"
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,52 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
},
|
|
5
|
-
"dependencies": {
|
|
6
|
-
"@vmz/commander": "^0.2.0",
|
|
7
|
-
"jiti": "^2.4.2"
|
|
8
|
-
},
|
|
2
|
+
"name": "@notedge/panduck",
|
|
3
|
+
"version": "0.0.1",
|
|
9
4
|
"description": "Panduck document conversion bindings (Node-API + TypeScript)",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MPL-2.0",
|
|
7
|
+
"bin": {
|
|
8
|
+
"panduck": "bin/panduck"
|
|
14
9
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
17
12
|
},
|
|
18
13
|
"exports": {
|
|
19
14
|
".": "./src/index.ts",
|
|
20
|
-
"./cli": "./src/cli/index.ts",
|
|
21
15
|
"./node": "./src/node/index.ts",
|
|
22
|
-
"./wasm": "./src/wasm/index.ts"
|
|
16
|
+
"./wasm": "./src/wasm/index.ts",
|
|
17
|
+
"./cli": "./src/cli/index.ts"
|
|
23
18
|
},
|
|
24
19
|
"files": [
|
|
25
20
|
"bin",
|
|
26
21
|
"locales",
|
|
27
22
|
"src"
|
|
28
23
|
],
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"optionalDependencies": {
|
|
32
|
-
"@notedge/panduck-darwin-arm64": "0.0.0",
|
|
33
|
-
"@notedge/panduck-darwin-x64": "0.0.0",
|
|
34
|
-
"@notedge/panduck-linux-arm64": "0.0.0",
|
|
35
|
-
"@notedge/panduck-linux-x64": "0.0.0",
|
|
36
|
-
"@notedge/panduck-unknown-wasm32": "0.0.0",
|
|
37
|
-
"@notedge/panduck-win32-x64": "0.0.0"
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
38
26
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
27
|
+
"scripts": {
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"test:e2e": "tsx --test tests/**/*.test.ts"
|
|
41
30
|
},
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@vmz/commander": "^0.2.0",
|
|
33
|
+
"jiti": "^2.4.2"
|
|
45
34
|
},
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
35
|
+
"optionalDependencies": {
|
|
36
|
+
"@notedge/panduck-darwin-arm64": "0.0.1",
|
|
37
|
+
"@notedge/panduck-darwin-x64": "0.0.1",
|
|
38
|
+
"@notedge/panduck-linux-arm64": "0.0.1",
|
|
39
|
+
"@notedge/panduck-linux-x64": "0.0.1",
|
|
40
|
+
"@notedge/panduck-win32-x64": "0.0.1",
|
|
41
|
+
"@notedge/panduck-unknown-wasm32": "0.0.1"
|
|
49
42
|
},
|
|
50
|
-
"
|
|
51
|
-
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/notedge/panduck.git"
|
|
46
|
+
}
|
|
52
47
|
}
|
package/readme.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# @notedge/panduck
|
|
2
|
-
|
|
3
|
-
TypeScript loader for Panduck Node-API bindings under the `@notedge` scope.
|
|
4
|
-
|
|
5
|
-
Build native artifacts first: `pnpm run build:napi` at the repo root.
|
|
1
|
+
# @notedge/panduck
|
|
2
|
+
|
|
3
|
+
TypeScript loader for Panduck Node-API bindings under the `@notedge` scope.
|
|
4
|
+
|
|
5
|
+
Build native artifacts first: `pnpm run build:napi` at the repo root.
|
package/src/cli/cli.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { dirname, join } from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
4
|
-
import { createCli } from "@vmz/commander";
|
|
5
|
-
|
|
6
|
-
import { registerCheckCommand } from "./commands/check-cmd.js";
|
|
7
|
-
import { registerConvertCommand } from "./commands/convert-cmd.js";
|
|
8
|
-
import { registerDoctorCommand } from "./commands/doctor-cmd.js";
|
|
9
|
-
import { registerFormatsCommand } from "./commands/formats-cmd.js";
|
|
10
|
-
import { registerInspectCommand } from "./commands/inspect-cmd.js";
|
|
11
|
-
import { registerPlanCommand } from "./commands/plan-cmd.js";
|
|
12
|
-
|
|
13
|
-
export function buildPanduckCli() {
|
|
14
|
-
const localesRoot = join(dirname(fileURLToPath(import.meta.url)), "../../locales");
|
|
15
|
-
const cli = createCli("panduck")
|
|
16
|
-
.locales(localesRoot, { envKeys: ["PANDUCK_LOCALE", "LOCALE", "LANG", "LC_ALL"] })
|
|
17
|
-
.intro("cli.intro")
|
|
18
|
-
.option("--log-file <file>", "cli.opt.log-file");
|
|
19
|
-
|
|
20
|
-
registerConvertCommand(cli);
|
|
21
|
-
registerPlanCommand(cli);
|
|
22
|
-
registerInspectCommand(cli);
|
|
23
|
-
registerCheckCommand(cli);
|
|
24
|
-
registerFormatsCommand(cli);
|
|
25
|
-
registerDoctorCommand(cli);
|
|
26
|
-
|
|
27
|
-
return cli;
|
|
28
|
-
}
|
|
1
|
+
import { dirname, join } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
|
|
4
|
+
import { createCli } from "@vmz/commander";
|
|
5
|
+
|
|
6
|
+
import { registerCheckCommand } from "./commands/check-cmd.js";
|
|
7
|
+
import { registerConvertCommand } from "./commands/convert-cmd.js";
|
|
8
|
+
import { registerDoctorCommand } from "./commands/doctor-cmd.js";
|
|
9
|
+
import { registerFormatsCommand } from "./commands/formats-cmd.js";
|
|
10
|
+
import { registerInspectCommand } from "./commands/inspect-cmd.js";
|
|
11
|
+
import { registerPlanCommand } from "./commands/plan-cmd.js";
|
|
12
|
+
|
|
13
|
+
export function buildPanduckCli() {
|
|
14
|
+
const localesRoot = join(dirname(fileURLToPath(import.meta.url)), "../../locales");
|
|
15
|
+
const cli = createCli("panduck")
|
|
16
|
+
.locales(localesRoot, { envKeys: ["PANDUCK_LOCALE", "LOCALE", "LANG", "LC_ALL"] })
|
|
17
|
+
.intro("cli.intro")
|
|
18
|
+
.option("--log-file <file>", "cli.opt.log-file");
|
|
19
|
+
|
|
20
|
+
registerConvertCommand(cli);
|
|
21
|
+
registerPlanCommand(cli);
|
|
22
|
+
registerInspectCommand(cli);
|
|
23
|
+
registerCheckCommand(cli);
|
|
24
|
+
registerFormatsCommand(cli);
|
|
25
|
+
registerDoctorCommand(cli);
|
|
26
|
+
|
|
27
|
+
return cli;
|
|
28
|
+
}
|