@koda-sl/baker-cli 0.279.0-dev.1f1c09c80 → 0.280.0-dev.1f1c09c80
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 +18 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33126,6 +33126,9 @@ async function readBrandFromWorkspace(root = ".") {
|
|
|
33126
33126
|
}
|
|
33127
33127
|
return found;
|
|
33128
33128
|
}
|
|
33129
|
+
function svgIsLiveText(svg) {
|
|
33130
|
+
return /<text[\s>]/i.test(svg);
|
|
33131
|
+
}
|
|
33129
33132
|
|
|
33130
33133
|
// src/commands/canvas/composition-path.ts
|
|
33131
33134
|
import { existsSync as existsSync4 } from "fs";
|
|
@@ -33292,6 +33295,21 @@ var scaffoldAdCommand = defineCommand104({
|
|
|
33292
33295
|
process.exit(1);
|
|
33293
33296
|
return;
|
|
33294
33297
|
}
|
|
33298
|
+
if (resolvedLogo?.toLowerCase().endsWith(".svg")) {
|
|
33299
|
+
const svg = await readFile16(resolvedLogo, "utf-8").catch(() => "");
|
|
33300
|
+
if (svg && svgIsLiveText(svg)) {
|
|
33301
|
+
writeJson({
|
|
33302
|
+
ok: false,
|
|
33303
|
+
error: {
|
|
33304
|
+
code: "VALIDATION_ERROR",
|
|
33305
|
+
message: `The mark at \`${resolvedLogo}\` draws its wordmark with live \`<text>\`, not outlines. That is a typed stand-in, not a logo: it renders in whatever font the machine happens to have, and the one that shipped this way came out reading "greenle\xE1" in every frame.`,
|
|
33306
|
+
fix: `Ask the client for their real logo file and put it in \`${BRAND_DIR}/logos/\` \u2014 an outlined SVG, or a PNG at 1000px or wider. Do not redraw it.`
|
|
33307
|
+
}
|
|
33308
|
+
});
|
|
33309
|
+
process.exit(1);
|
|
33310
|
+
return;
|
|
33311
|
+
}
|
|
33312
|
+
}
|
|
33295
33313
|
const blueprint = adSpecToBlueprint(spec.data);
|
|
33296
33314
|
const slug = args.slug ?? path24.basename(specPath).replace(/\.[^.]+$/, "");
|
|
33297
33315
|
const outPath = args.out ?? (args.slug ? path24.join("src/creatives", slug, `${slug}.canvas.json`) : path24.join(path24.dirname(specPath), `${slug}.canvas.json`));
|