package dev.dinauer.maven.app;

import dev.dinauer.maven.maven.core.release.ReleaseJar;
import jakarta.enterprise.context.ApplicationScoped;

import java.util.List;

@ApplicationScoped
public class JarMapper
{
    public List<JarDTO> map(List<ReleaseJar> input)
    {
        return input.stream().map(this::map).toList();
    }

    public JarDTO map(ReleaseJar input)
    {
        return new JarDTO(input.getFilename(), input.getClassifier(), input.getMd5(), input.getSha1());
    }
}
