(input: PatchInput, dep: PatchDeps = defaultPatchDeps)
| 419 | } |
| 420 | |
| 421 | export 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 | } |
no test coverage detected