MCPcopy Index your code
hub / github.com/anomalyco/opencode / patchPluginConfig

Function patchPluginConfig

packages/opencode/src/plugin/install.ts:421–439  ·  view source on GitHub ↗
(input: PatchInput, dep: PatchDeps = defaultPatchDeps)

Source from the content-addressed store, hash-verified

419}
420
421export async function patchPluginConfig(input: PatchInput, dep: PatchDeps = defaultPatchDeps): Promise<PatchResult> {
422 const dir = patchDir(input)
423 const items: PatchItem[] = []
424 for (const target of input.targets) {
425 const hit = await patchOne(dir, target, input.spec, Boolean(input.force), dep)
426 if (!hit.ok) {
427 return {
428 ...hit,
429 dir,
430 }
431 }
432 items.push(hit.item)
433 }
434 return {
435 ok: true,
436 dir,
437 items,
438 }
439}

Callers 2

installPluginBySpecFunction · 0.90
createPlugTaskFunction · 0.90

Calls 3

patchDirFunction · 0.85
patchOneFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected