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

Function openBrowser

packages/cli/src/auth/browser.ts:15–28  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

13}
14
15export async function openBrowser(url: string): Promise<OpenBrowserResult> {
16 if (process.env["BROWSER"] === "none" || process.env["HF_NO_BROWSER"] === "1") {
17 printManualInstructions(url);
18 return { opened: false };
19 }
20 try {
21 const open = (await import("open")).default;
22 await open(url);
23 return { opened: true };
24 } catch (err) {
25 printManualInstructions(url, normalizeErrorMessage(err));
26 return { opened: false };
27 }
28}
29
30function printManualInstructions(url: string, detail?: string): void {
31 if (detail) {

Callers 4

runFunction · 0.50
runFunction · 0.50
openStudioBrowserFunction · 0.50

Calls 3

printManualInstructionsFunction · 0.85
openFunction · 0.85
normalizeErrorMessageFunction · 0.50

Tested by

no test coverage detected