mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 19:36:04 +00:00
* ci(windows): probe that a render opens no visible window * ci(windows): the probe names what opened each window * ci(windows): the probe spawns each binary alone, with and without detached * ci(windows): the probe logs the processes started during the render * ci(windows): the probe also spawns Chrome one consoleless hop down * ci(windows): the probe logs each child started without windowsHide * ci(windows): the probe logs every child process with its windowsHide and detached * fix(engine): Chrome keeps the CLI's console on Windows, so a render opens no window * fix(cli): every child the CLI starts on Windows is hidden unless it opts out * ci(windows): the probe bisects Chrome's flags and keeps each command's output * ci(windows): the probe names the Chrome process behind each window * ci(windows): the probe loads a page in Chrome directly and one hidden hop down * ci(windows): the probe prints the Chrome main command line and renders with the reporter's flags * ci(windows): the probe narrows the CLI's Chrome arguments to the ones that open a window * ci(windows): the probe launches the CLI's Chrome arguments one hidden hop down * ci(windows): the probe launches Chrome through the engine's browser pool * ci(windows): the probe varies what the engine passes to Puppeteer * fix(engine): renders on Windows launch Chrome with a Puppeteer that keeps it attached * refactor(cli): hideChildConsoles copies its arguments and keeps one comment line
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
// fallow-ignore-file unused-file
|
|
import "./utils/hideChildConsoles.js";
|
|
import { injectDeterministicFontFaces } from "@hyperframes/producer";
|
|
import { runFontLocalize, stampFontVersions } from "./fontLocalize.js";
|
|
import { PRODUCER_VERSION, VERSION } from "./version.js";
|
|
|
|
async function readStdin(): Promise<string> {
|
|
const chunks: Buffer[] = [];
|
|
for await (const chunk of process.stdin) {
|
|
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
}
|
|
return Buffer.concat(chunks).toString("utf8");
|
|
}
|
|
|
|
/** Standalone-entry main; the bin wrapper owns the actual process exit code. */
|
|
export async function main(): Promise<number> {
|
|
return runFontLocalize(
|
|
{
|
|
readInput: readStdin,
|
|
writeOutput: (value) => process.stdout.write(value),
|
|
writeError: (value) => process.stderr.write(value),
|
|
},
|
|
async (html) => {
|
|
const localized = await injectDeterministicFontFaces(html, {
|
|
failClosedFontFetch: true,
|
|
allowSystemFontCapture: false,
|
|
});
|
|
return stampFontVersions(localized, {
|
|
producer: PRODUCER_VERSION,
|
|
localizer: VERSION,
|
|
});
|
|
},
|
|
);
|
|
}
|