@koda-sl/baker-cli 0.225.0 → 0.226.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
@@ -21606,7 +21606,6 @@ function asAuthored(css, normalized) {
21606
21606
  function unresolvedBrandFamilies(css) {
21607
21607
  const declared = [...parseBrandTokens(css, "").fonts].filter((family) => !GENERIC_FAMILIES.has(family));
21608
21608
  const loaded = fontFaceFamilies(css);
21609
- for (const request of googleFontRequests(stripCssComments(css))) loaded.add(normalizeFamily(request.family));
21610
21609
  return declared.filter((family) => !loaded.has(family)).map((family) => asAuthored(css, family));
21611
21610
  }
21612
21611
  function stripFontFaceBlocks(source, family, styles) {
@@ -21761,7 +21760,7 @@ function fetchHints({
21761
21760
  // The remedy is provider-specific: only a Google family has an @import
21762
21761
  // to fall back on, and telling an agent to keep one for a Fontsource
21763
21762
  // family sends it to write an import Google will 400.
21764
- provider === "google" ? `PARTIAL: ${incomplete.join(", ")} did not download and is NOT in the \`fontFace\` block. Keep "${family}" in the Google @import for those weights, or re-run \`baker brand fonts fetch "${family}" --weights ${incomplete.join(",")}\`.` : `PARTIAL: ${incomplete.join(", ")} did not download and is NOT in the \`fontFace\` block. ${PROVIDER_LABEL[provider]} does not serve them, so re-run \`baker brand fonts fetch "${family}" --weights ${downloadedWeights.join(",")}\` and record only those weights in src/brand/BRAND.md.`
21763
+ provider === "google" ? `PARTIAL: ${incomplete.join(", ")} did not download and is NOT in the \`fontFace\` block. Re-run \`baker brand fonts fetch "${family}" --weights ${incomplete.join(",")}\` \u2014 a Google @import cannot cover those weights, because the build drops it before the page loads.` : `PARTIAL: ${incomplete.join(", ")} did not download and is NOT in the \`fontFace\` block. ${PROVIDER_LABEL[provider]} does not serve them, so re-run \`baker brand fonts fetch "${family}" --weights ${downloadedWeights.join(",")}\` and record only those weights in src/brand/BRAND.md.`
21765
21764
  ] : [],
21766
21765
  `Licensing: ${PROVIDER_LABEL[provider]} carries open-licensed families, which are safe to self-host. A client's own commercial face is not \u2014 confirm before re-hosting one.`
21767
21766
  ];
@@ -21856,7 +21855,7 @@ async function unresolvedAction(css, unresolved) {
21856
21855
  var fontsCheckCommand = defineCommand93({
21857
21856
  meta: {
21858
21857
  name: "check",
21859
- description: "Verify the brand's fonts really exist. First: every --font-* family in src/styles/global.css must be provided by an @font-face or a Google import, or it renders as a fallback on every page. Then, for families requested from Google, ask Google what it actually serves \u2014 a weight nobody serves is silently synthesized."
21858
+ description: "Verify the brand's fonts really exist. First: every --font-* family in src/styles/global.css must be provided by a local @font-face, or it renders as a fallback on every page \u2014 a Google @import does not provide one here, the build drops it before the page loads. Then, for families still requested from Google, ask Google what it actually serves \u2014 a weight nobody serves is silently synthesized."
21860
21859
  },
21861
21860
  async run() {
21862
21861
  const css = await readGlobalCss();
@@ -21865,7 +21864,7 @@ var fontsCheckCommand = defineCommand93({
21865
21864
  if (unresolved.length > 0) {
21866
21865
  fail("FONT_NOT_LOADED", `Nothing loads ${unresolved.map((f) => `"${f}"`).join(", ")} in ${GLOBAL_CSS}.`, {
21867
21866
  action: await unresolvedAction(css, unresolved),
21868
- explanation: "The family is declared as a brand font but no @font-face and no Google import provides it, so every page silently renders a fallback. The client's verify fails on this too.",
21867
+ explanation: "The family is declared as a brand font but no @font-face provides it, so every page silently renders a fallback. A Google @import does not count: Astro merges component CSS ahead of global.css into one inlined <style>, so the import lands after rules and the browser drops it \u2014 measured on a live client site. The client's verify fails on this too.",
21869
21868
  unresolved
21870
21869
  });
21871
21870
  }