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

Function resolveProject

packages/cli/src/utils/project.ts:54–69  ·  view source on GitHub ↗
(dirArg: string | undefined)

Source from the content-addressed store, hash-verified

52}
53
54export function resolveProject(dirArg: string | undefined): ProjectDir {
55 try {
56 return resolveProjectOrThrow(dirArg);
57 } catch (err) {
58 if (err instanceof InvalidProjectError) {
59 // Self-exit (not a throw) so the cli.ts wrapper never sees it — report
60 // inline. argv[2] is the running command (info / inspect / render / ...).
61 // This is the dominant failure for read-only commands like `info` run
62 // outside a project; the redaction in trackCliError strips the dir path.
63 trackCommandFailure(process.argv[2] ?? "unknown", err);
64 errorBox(err.title, err.hint, err.suggestion);
65 process.exit(1);
66 }
67 throw err;
68 }
69}

Callers 15

runFunction · 0.50
runFunction · 0.50
resolveScopeFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50
runFunction · 0.50

Calls 3

resolveProjectOrThrowFunction · 0.85
trackCommandFailureFunction · 0.85
errorBoxFunction · 0.85

Tested by

no test coverage detected