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

Function hasResolvableTarget

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

Source from the content-addressed store, hash-verified

25}
26
27function hasResolvableTarget(basePath: string): boolean {
28 const withoutJs = basePath.replace(/\.js$/u, '')
29 const candidates = [
30 withoutJs,
31 `${withoutJs}.ts`,
32 `${withoutJs}.tsx`,
33 `${withoutJs}.js`,
34 `${withoutJs}.jsx`,
35 `${withoutJs}.mjs`,
36 `${withoutJs}.cjs`,
37 join(withoutJs, 'index.ts'),
38 join(withoutJs, 'index.tsx'),
39 join(withoutJs, 'index.js'),
40 ]
41 return candidates.some(candidate => existsSync(candidate))
42}
43
44function collectMissingRelativeImports(): MissingImport[] {
45 const files: string[] = []

Callers 1

Calls 1

existsSyncFunction · 0.90

Tested by

no test coverage detected