@liustack/pptfast 0.4.0 → 0.6.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.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  resolveSpecThemeId,
11
11
  specJsonSchema,
12
12
  validateSpec
13
- } from "./chunk-4W2YZPJJ.js";
13
+ } from "./chunk-2ZOMS6G3.js";
14
14
  import {
15
15
  installNodePlatform
16
16
  } from "./chunk-HFRNKYZ6.js";
@@ -23,6 +23,7 @@ import {
23
23
  StyleOverrideSchema,
24
24
  auditDeck,
25
25
  formatIssues,
26
+ formatWarnings,
26
27
  generatePptx,
27
28
  getInstalledThemeIds,
28
29
  irJsonSchema,
@@ -31,7 +32,7 @@ import {
31
32
  resolveNarrative,
32
33
  styleJsonSchema,
33
34
  validateIr
34
- } from "./chunk-7N4HGSMW.js";
35
+ } from "./chunk-7V73LHUQ.js";
35
36
  import {
36
37
  getPlatform
37
38
  } from "./chunk-L524YK63.js";
@@ -693,9 +694,9 @@ ${formatIssues(v.errors)}`);
693
694
  await mkdir2(dirname2(resolve5(opts.output)), { recursive: true });
694
695
  await writeFile2(opts.output, bytes);
695
696
  const ok = `wrote ${opts.output} (${v.ir.slides.length} slides, ${bytes.length} bytes)`;
696
- const note = normalizedNote(v.normalized);
697
- return note ? `${ok}
698
- ${note}` : ok;
697
+ const notes = [warningsNote(v.warnings), normalizedNote(v.normalized)].filter((n) => n !== void 0);
698
+ return notes.length > 0 ? `${ok}
699
+ ${notes.join("\n")}` : ok;
699
700
  }
700
701
  function normalizedNote(normalized) {
701
702
  if (!normalized || normalized.length === 0) return void 0;
@@ -703,6 +704,10 @@ function normalizedNote(normalized) {
703
704
  return `note: ${n} field alias${n === 1 ? "" : "es"} normalized
704
705
  ${normalized.map((line) => ` ${line}`).join("\n")}`;
705
706
  }
707
+ function warningsNote(warnings) {
708
+ if (!warnings || warnings.length === 0) return void 0;
709
+ return formatWarnings(warnings);
710
+ }
706
711
  function placeholderNote(ir) {
707
712
  const placeholders = ir.slides.map((slide, i) => ({ slide, page: i + 1 })).filter(({ slide }) => slide.placeholder);
708
713
  if (placeholders.length === 0) return void 0;
@@ -721,6 +726,8 @@ ${formatIssues(v.errors)}`
721
726
  );
722
727
  const ok = `OK \u2014 ${v.ir.slides.length} slides, theme "${v.ir.theme.id}"`;
723
728
  const notes = [];
729
+ const warnNote = warningsNote(v.warnings);
730
+ if (warnNote) notes.push(warnNote);
724
731
  const aliasNote = normalizedNote(v.normalized);
725
732
  if (aliasNote) notes.push(aliasNote);
726
733
  if (isDir) {