Import from internal git

This commit is contained in:
2025-10-11 13:08:09 +02:00
commit 97aaa715dc
175 changed files with 7014 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using Core;
using Core.Events;
using Core.SpecConfig;
using Generator.Daos;
using Generator.Infrastructure.Publication;
using YamlDotNet.Core;
namespace Generator.Repo;
public class PublisherRepo
{
private readonly Publisher _publisher;
private readonly DotnetDao _dotnetDao;
private readonly JavaDao _javaDao;
private readonly JavascriptDao _javascriptDao;
public PublisherRepo(
EnvironmentDao envDao,
DotnetDao dotnetDao,
JavaDao javaDao,
JavascriptDao jsDao,
DisplayEmitter emitter)
{
_publisher = new Publisher(envDao.Invite, emitter);
_dotnetDao = dotnetDao;
_javaDao = javaDao;
_javascriptDao = jsDao;
}
public async Task PublishDotnet(GenerationType type, ISpecFile file)
{
var config = _dotnetDao.GetDotnetPublish(type, file);
await _publisher.PublishNugget(config);
}
public async Task PublishJava(GenerationType type, ISpecFile file)
{
var config = _javaDao.GetJavaPublish(type, file);
await _publisher.PublishMaven(config);
}
public async Task PublishJavascript(GenerationType type, ISpecFile file)
{
var config = _javascriptDao.GetJavascriptPublish(type, file);
await _publisher.PublishNpm(config);
}
}