MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / isCode

Function isCode

graph-ui/src/architecture/container-source.ts:16–18  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

14export const isComposePath = (path: string) => /(^|\/)(?:docker-)?compose(?:[.-][\w.-]+)?\.ya?ml$/i.test(path);
15const isDockerfile = (path: string) => /(^|\/)(?:Dockerfile(?:[.][\w.-]+)?|[\w.-]+\.Dockerfile)$/i.test(path);
16const isCode = (path: string) => /\.(?:py|js|jsx|ts|tsx|cs|go|java|kt|rs|rb|php|c|cc|cpp|ex|exs)$/i.test(path)
17 && !/(^|\/)(?:node_modules|vendor|vendored|test|tests|fixtures|dist|build)\//.test(path)
18 && !/\.(?:min|test|spec)\.[^.]+$/.test(path);
19const checkAbort = (signal: AbortSignal) => { if (signal.aborted) throw new DOMException('Aborted', 'AbortError'); };
20
21/** File names that can be Compose manifests; isComposePath decides. The filter keeps the answer small in any repository. */

Callers 3

loadContainerInventoryFunction · 0.85
readContainerSourceFunction · 0.85
loadContainerTopologyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected