mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-09 03:16:38 +00:00
feat(cli): stamp font compiler version in localized HTML
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// fallow-ignore-file unused-file
|
||||
import { injectDeterministicFontFaces } from "@hyperframes/producer";
|
||||
import { runFontLocalize } from "./fontLocalize.js";
|
||||
import { runFontLocalize, stampFontCompilerVersion } from "./fontLocalize.js";
|
||||
import { VERSION } from "./version.js";
|
||||
|
||||
async function readStdin(): Promise<string> {
|
||||
const chunks: Buffer[] = [];
|
||||
@@ -18,10 +19,12 @@ export async function main(): Promise<number> {
|
||||
writeOutput: (value) => process.stdout.write(value),
|
||||
writeError: (value) => process.stderr.write(value),
|
||||
},
|
||||
(html) =>
|
||||
injectDeterministicFontFaces(html, {
|
||||
async (html) => {
|
||||
const localized = await injectDeterministicFontFaces(html, {
|
||||
failClosedFontFetch: true,
|
||||
allowSystemFontCapture: false,
|
||||
}),
|
||||
});
|
||||
return stampFontCompilerVersion(localized, VERSION);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user