mark-deco-cli 0.3.0 → 0.4.0

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/cli.cjs CHANGED
@@ -32449,23 +32449,13 @@ function setupProcessor(config) {
32449
32449
  );
32450
32450
  const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
32451
32451
  if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {
32452
- plugins.push(It(th, {
32453
- fetcher,
32454
- logger,
32455
- timeout: config.oembed?.timeout || 5e3
32456
- }));
32452
+ plugins.push(It(th, {}));
32457
32453
  }
32458
32454
  if (enabledPlugins.includes("card") && config.card?.enabled !== false) {
32459
- plugins.push(Ht({
32460
- fetcher,
32461
- logger,
32462
- amazonAssociateId: config.card?.amazonAssociateId
32463
- }));
32455
+ plugins.push(Ht({}));
32464
32456
  }
32465
32457
  if (enabledPlugins.includes("mermaid") && config.mermaid?.enabled !== false) {
32466
- plugins.push(Nt({
32467
- theme: config.mermaid?.theme || "default"
32468
- }));
32458
+ plugins.push(Nt({}));
32469
32459
  }
32470
32460
  return xt({
32471
32461
  plugins,
@@ -32475,7 +32465,7 @@ function setupProcessor(config) {
32475
32465
  }
32476
32466
  const program = new commander.Command();
32477
32467
  async function main() {
32478
- program.name("mark-deco-cli").description("MarkDeco - Markdown to HTML conversion processor.\nCopyright (c) Kouji Matsui (@kekyo@mi.kekyo.net)").version("0.3.0");
32468
+ program.name("mark-deco-cli").description("MarkDeco - Markdown to HTML conversion processor.\nCopyright (c) Kouji Matsui (@kekyo@mi.kekyo.net)").version("0.4.0");
32479
32469
  program.option("-i, --input <file>", "Input markdown file (default: stdin)").option("-o, --output <file>", "Output HTML file (default: stdout)").option("-c, --config <file>", "Configuration file path").option("-p, --plugins [plugins...]", "Enable specific plugins (oembed, card, mermaid)").option("--no-plugins", "Disable all default plugins").option("--unique-id-prefix <prefix>", "Prefix for unique IDs", "section").option("--hierarchical-heading-id", "Use hierarchical heading IDs", true).option("--content-based-heading-id", "Use content-based heading IDs", false).option("--frontmatter-output <file>", "Output frontmatter as JSON to specified file").option("--heading-tree-output <file>", "Output heading tree as JSON to specified file").action(async (options2) => {
32480
32470
  try {
32481
32471
  const config = await loadConfig(options2.config);
@@ -32483,8 +32473,8 @@ async function main() {
32483
32473
  const markdown = await readInput(options2.input);
32484
32474
  const processor = setupProcessor(mergedOptions);
32485
32475
  const result = await processor.process(markdown, options2.uniqueIdPrefix || "section", {
32486
- useHierarchicalHeadingId: options2.hierarchicalHeadingId,
32487
- useContentStringHeaderId: options2.contentBasedHeadingId
32476
+ useHierarchicalHeadingId: options2.hierarchicalHeadingId ?? true,
32477
+ useContentStringHeaderId: options2.contentBasedHeadingId ?? false
32488
32478
  });
32489
32479
  await writeOutput(result.html, options2.output);
32490
32480
  if (options2.frontmatterOutput) {