MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / getFoundryRootFromSrc

Function getFoundryRootFromSrc

src/project/foundry.ts:5–10  ·  view source on GitHub ↗
(srcDirectory: string)

Source from the content-addressed store, hash-verified

3import { containsChild, findDirectoryInTree, getDir, mkdirIfNotExists, parentOf } from "./paths"
4
5const getFoundryRootFromSrc = (srcDirectory: string) => {
6 const rootDirectory = srcDirectory && parentOf(srcDirectory);
7 if (containsChild(rootDirectory, 'foundry.toml')) {
8 return rootDirectory;
9 }
10}
11
12function tryFindFoundryDirectories(output: string) {
13 let srcDirectory = findDirectoryInTree(output, 'src');

Callers 1

Calls 2

parentOfFunction · 0.90
containsChildFunction · 0.90

Tested by

no test coverage detected