(dep: DependencyAttribution)
| 129 | |
| 130 | // Build injection pattern from a dependency (for package.json) |
| 131 | function dependencyInjection(dep: DependencyAttribution): Injection { |
| 132 | return { |
| 133 | matches: (line) => line.includes(`"${dep.name}"`), |
| 134 | appliesTo: (path) => path.endsWith('package.json'), |
| 135 | source: { sourceId: dep.sourceId, sourceName: dep.sourceName }, |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | export async function computeAttribution( |
| 140 | input: AttributionInput, |
nothing calls this directly
no outgoing calls
no test coverage detected