feat: add import info from alr-repo.toml

This commit is contained in:
2025-07-07 17:45:20 +03:00
parent 1cc408ad7d
commit f42be105ad
19 changed files with 403 additions and 82 deletions

View File

@ -84,6 +84,43 @@ func InternalBuildCmd() *cli.Command {
}
}
func InternalReposCmd() *cli.Command {
return &cli.Command{
Name: "_internal-repos",
HideHelp: true,
Hidden: true,
Action: utils.RootNeededAction(func(ctx *cli.Context) error {
logger.SetupForGoPlugin()
if err := utils.ExitIfCantDropCapsToAlrUser(); err != nil {
return err
}
deps, err := appbuilder.
New(ctx.Context).
WithConfig().
WithDB().
WithReposNoPull().
Build()
if err != nil {
return err
}
defer deps.Defer()
pluginCfg := build.GetPluginServeCommonConfig()
pluginCfg.Plugins = map[string]plugin.Plugin{
"repos": &build.ReposExecutorPlugin{
Impl: build.NewRepos(
deps.Repos,
),
},
}
plugin.Serve(pluginCfg)
return nil
}),
}
}
func InternalInstallCmd() *cli.Command {
return &cli.Command{
Name: "_internal-installer",