@koda-sl/baker-cli 0.158.0 → 0.158.2
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
CHANGED
|
@@ -4809,6 +4809,7 @@ baker brand fonts fetch "Inter" --subsets latin,latin-ext # add accented-glyph
|
|
|
4809
4809
|
- **Failures carry the numbers, so nothing needs a second call.** `check`'s error keeps the full per-family breakdown at `error.fix.families` (healthy families included, so a multi-family brand shows what not to touch), and both commands probe the standard weights to report the ones that *do* exist at `error.fix.served` — the remediation is "retry with one of these" rather than "run `check`", which would be the command that just failed.
|
|
4810
4810
|
- **`fetch`** downloads the family into `src/brand/fonts/` and prints the `@font-face` block to paste above `@theme`. Defaults to the `latin` subset; `--subsets latin,latin-ext` adds accented-glyph coverage for Spanish and Portuguese copy. One file per weight *and* subset, since Google ships them separately and `unicode-range` is carried through verbatim.
|
|
4811
4811
|
- **It does not edit `global.css` for you.** Paste the block, then drop that family from the Google `@import` — otherwise the page self-hosts *and* still calls Google. Record the weights in `src/brand/BRAND.md` in the same change.
|
|
4812
|
+
- **The emitted `src:` is relative to `global.css` (`../brand/fonts/…`) on purpose — keep it that way.** A root-relative `/src/brand/fonts/…` reads to the bundler as a path something else already serves, so the file never lands in the published build and every page 404s it. That failure is silent: an unfetchable face falls back to a system font, so the site just renders off-brand. Kept relative, the bundler resolves it on disk, content-hashes it, and ships it. The scaffold's `validate-public-asset-refs` blocks the root-relative form.
|
|
4812
4813
|
- **Licensing:** Google Fonts are open-licensed and safe to self-host. A client's own commercial typeface is not — confirm before re-hosting one.
|
|
4813
4814
|
|
|
4814
4815
|
Complements the offline `validate-brand-fonts` check that runs in the scaffold's `verify`: that one compares what `global.css` declares against what provides it, with no network. Only the network can answer whether Google really serves a given family and weight.
|
|
@@ -741,7 +741,12 @@ async function parseErrorBody(res) {
|
|
|
741
741
|
} catch {
|
|
742
742
|
}
|
|
743
743
|
const errObj = body.error ?? {};
|
|
744
|
-
|
|
744
|
+
const bodyless = body.error === void 0 && res.status >= 500;
|
|
745
|
+
const message2 = bodyless ? `HTTP ${res.status} with no response body \u2014 the request was dropped before the server answered` : errObj.message ?? `HTTP ${res.status}`;
|
|
746
|
+
if (bodyless && res.status === 502) {
|
|
747
|
+
return { kind: "server", status: res.status, message: message2 };
|
|
748
|
+
}
|
|
749
|
+
return classifyHttpError(res.status, errObj, message2);
|
|
745
750
|
}
|
|
746
751
|
function classifyHttpError(status, errObj, message2) {
|
|
747
752
|
if (errObj.code === CONTENT_POLICY_CODE) {
|
|
@@ -8023,4 +8028,4 @@ export {
|
|
|
8023
8028
|
defaultRegistry,
|
|
8024
8029
|
createEngineFromEnv
|
|
8025
8030
|
};
|
|
8026
|
-
//# sourceMappingURL=chunk-
|
|
8031
|
+
//# sourceMappingURL=chunk-CG6OTNUU.js.map
|