MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / resolveExtensionPath

Function resolveExtensionPath

apps/cli/src/commands/cli/list.ts:55–63  ·  view source on GitHub ↗
(extension: string | undefined)

Source from the content-addressed store, hash-verified

53}
54
55function resolveExtensionPath(extension: string | undefined): string {
56 const resolved = path.resolve(extension || getDefaultExtensionPath(__dirname))
57
58 if (!fs.existsSync(path.join(resolved, "extension.js"))) {
59 throw new Error(`Extension bundle not found at: ${resolved}`)
60 }
61
62 return resolved
63}
64
65function outputJson(data: unknown): void {
66 process.stdout.write(JSON.stringify(data, null, 2) + "\n")

Callers 1

createListHostFunction · 0.85

Calls 1

getDefaultExtensionPathFunction · 0.85

Tested by

no test coverage detected