@koda-sl/baker-cli 0.281.9-dev.1f1c09c80 → 0.281.10-dev.7a0f94402

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
@@ -33326,11 +33326,29 @@ function svgIsLiveText(svg) {
33326
33326
  return /<text[\s>]/i.test(svg);
33327
33327
  }
33328
33328
  async function markIsReal(markPath, root = ".") {
33329
- const brandLogos = path22.join(root, BRAND_DIR, "logos");
33330
- const brandFiles = await readdir8(brandLogos).catch(() => null);
33331
- if (brandFiles) return await markDirectoryIsReal(brandLogos);
33329
+ const brandLogos = await findBrandLogosDir(markPath, root);
33330
+ if (brandLogos) return await markDirectoryIsReal(brandLogos);
33332
33331
  return await markDirectoryIsReal(path22.dirname(markPath));
33333
33332
  }
33333
+ async function findBrandLogosDir(markPath, root) {
33334
+ const candidates = [];
33335
+ let dir = path22.resolve(path22.dirname(markPath));
33336
+ for (; ; ) {
33337
+ candidates.push(path22.join(dir, BRAND_DIR, "logos"));
33338
+ const parent = path22.dirname(dir);
33339
+ if (parent === dir) break;
33340
+ dir = parent;
33341
+ }
33342
+ candidates.push(path22.join(root, BRAND_DIR, "logos"));
33343
+ for (const candidate of candidates) {
33344
+ if (await readdir8(candidate).then(
33345
+ () => true,
33346
+ () => false
33347
+ ))
33348
+ return candidate;
33349
+ }
33350
+ return null;
33351
+ }
33334
33352
  async function markDirectoryIsReal(dir) {
33335
33353
  const files = await readdir8(dir).catch(() => null);
33336
33354
  if (!files) return false;