@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/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/dist/{chunk-4W2YZPJJ.js → chunk-2ZOMS6G3.js} +3 -3
- package/dist/{chunk-4W2YZPJJ.js.map → chunk-2ZOMS6G3.js.map} +1 -1
- package/dist/{chunk-7N4HGSMW.js → chunk-7V73LHUQ.js} +837 -316
- package/dist/chunk-7V73LHUQ.js.map +1 -0
- package/dist/cli.js +12 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +46 -11
- package/dist/index.js +2 -2
- package/dist/{pixel-audit-4DXKLFBV.js → pixel-audit-ZRFTV4V7.js} +60 -18
- package/dist/pixel-audit-ZRFTV4V7.js.map +1 -0
- package/package.json +7 -2
- package/dist/chunk-7N4HGSMW.js.map +0 -1
- package/dist/pixel-audit-4DXKLFBV.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveSpecThemeId,
|
|
11
11
|
specJsonSchema,
|
|
12
12
|
validateSpec
|
|
13
|
-
} from "./chunk-
|
|
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-
|
|
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
|
|
697
|
-
return
|
|
698
|
-
${
|
|
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) {
|