MCPcopy Create free account
hub / github.com/QuantaAlpha/claude-code / hasResolvableTarget

Function hasResolvableTarget

src/dev-entry.ts:50–65  ·  view source on GitHub ↗
(basePath: string)

Source from the content-addressed store, hash-verified

48}
49
50function hasResolvableTarget(basePath: string): boolean {
51 const withoutJs = basePath.replace(/\.js$/u, '')
52 const candidates = [
53 withoutJs,
54 `${withoutJs}.ts`,
55 `${withoutJs}.tsx`,
56 `${withoutJs}.js`,
57 `${withoutJs}.jsx`,
58 `${withoutJs}.mjs`,
59 `${withoutJs}.cjs`,
60 join(withoutJs, 'index.ts'),
61 join(withoutJs, 'index.tsx'),
62 join(withoutJs, 'index.js'),
63 ]
64 return candidates.some(candidate => existsSync(candidate))
65}
66
67function collectMissingRelativeImports(): MissingImport[] {
68 const files: string[] = []

Callers 1

Calls 1

existsSyncFunction · 0.90

Tested by

no test coverage detected