MCPcopy Create free account
hub / github.com/firebase/firebase-tools / resolveProjectPath

Function resolveProjectPath

src/projectPath.ts:11–22  ·  view source on GitHub ↗
(
  options: { cwd?: string; configPath?: string },
  filePath: string,
)

Source from the content-addressed store, hash-verified

9 * @return the fully resolved path within the project directory
10 */
11export function resolveProjectPath(
12 options: { cwd?: string; configPath?: string },
13 filePath: string,
14): string {
15 const projectRoot = detectProjectRoot(options);
16 if (!projectRoot) {
17 throw new FirebaseError("Expected to be in a project directory, but none was found.", {
18 exit: 2,
19 });
20 }
21 return path.resolve(projectRoot, filePath);
22}

Callers 5

parseFileMethod · 0.90
prepareFrameworksFunction · 0.90
validateOneFunction · 0.90
startAllFunction · 0.90
startFunction · 0.90

Calls 1

detectProjectRootFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…