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

Function installFromLocal

source code/utils/plugins/pluginLoader.ts:858–870  ·  view source on GitHub ↗

* Install a plugin from a local path

(
  sourcePath: string,
  targetPath: string,
)

Source from the content-addressed store, hash-verified

856 * Install a plugin from a local path
857 */
858async function installFromLocal(
859 sourcePath: string,
860 targetPath: string,
861): Promise<void> {
862 if (!(await pathExists(sourcePath))) {
863 throw new Error(`Source path does not exist: ${sourcePath}`)
864 }
865
866 await copyDir(sourcePath, targetPath)
867
868 const gitPath = join(targetPath, '.git')
869 await rm(gitPath, { recursive: true, force: true })
870}
871
872/**
873 * Generate a temporary cache name for a plugin

Callers 1

cachePluginFunction · 0.85

Calls 3

pathExistsFunction · 0.85
copyDirFunction · 0.85
rmFunction · 0.85

Tested by

no test coverage detected