MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / loadFigSpec

Function loadFigSpec

source code/utils/bash/registry.ts:32–45  ·  view source on GitHub ↗
(
  command: string,
)

Source from the content-addressed store, hash-verified

30}
31
32export async function loadFigSpec(
33 command: string,
34): Promise<CommandSpec | null> {
35 if (!command || command.includes('/') || command.includes('\\')) return null
36 if (command.includes('..')) return null
37 if (command.startsWith('-') && command !== '-') return null
38
39 try {
40 const module = await import(`@withfig/autocomplete/build/${command}.js`)
41 return module.default || module
42 } catch {
43 return null
44 }
45}
46export const getCommandSpec = memoizeWithLRU(
47 async (command: string): Promise<CommandSpec | null> => {
48 const spec =

Callers 1

registry.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected