MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / runEnvironmentChecks

Function runEnvironmentChecks

packages/cli/src/browser/preflight.ts:239–277  ·  view source on GitHub ↗
(
  options: EnvironmentCheckOptions = {},
)

Source from the content-addressed store, hash-verified

237}
238
239export async function runEnvironmentChecks(
240 options: EnvironmentCheckOptions = {},
241): Promise<EnvironmentCheckResult> {
242 const outcomes: EnvironmentCheckOutcome[] = [];
243
244 const ffmpeg = checkFFmpeg();
245 outcomes.push(ffmpeg);
246
247 const ffprobe = checkFFprobe();
248 outcomes.push(ffprobe);
249
250 let browser: BrowserResult | undefined;
251 if (options.includeBrowser) {
252 const chrome = await checkChrome(options.browserPath);
253 outcomes.push(chrome);
254 if (chrome.ok && chrome.path) {
255 browser = {
256 executablePath: chrome.path,
257 source: options.browserPath ? "env" : "cache",
258 };
259 }
260 }
261
262 if (options.includeDisk) {
263 outcomes.push(checkDisk(options.projectDir));
264 }
265
266 if (options.includeWindowsUnc) {
267 const unc = checkWindowsUncPath(options.projectDir);
268 if (unc) outcomes.push(unc);
269 }
270
271 return {
272 outcomes,
273 ...(ffmpeg.path ? { ffmpegPath: ffmpeg.path } : {}),
274 ...(ffprobe.path ? { ffprobePath: ffprobe.path } : {}),
275 ...(browser ? { browser } : {}),
276 };
277}

Callers 3

preflight.test.tsFile · 0.85
runFunction · 0.85
renderLocalFunction · 0.85

Calls 5

checkFFmpegFunction · 0.85
checkFFprobeFunction · 0.85
checkChromeFunction · 0.85
checkWindowsUncPathFunction · 0.85
checkDiskFunction · 0.70

Tested by

no test coverage detected