refactor: move alr.sh parsing to pkg

This commit is contained in:
2025-06-09 17:56:46 +03:00
parent 237e2c338d
commit 1cdab8dfed
12 changed files with 389 additions and 190 deletions

View File

@ -20,6 +20,7 @@ import (
"context"
"gitea.plemya-x.ru/Plemya-x/ALR/internal/cliutils"
"gitea.plemya-x.ru/Plemya-x/ALR/pkg/alrsh"
)
type ScriptViewerConfig interface {
@ -33,12 +34,12 @@ type ScriptViewer struct {
func (s *ScriptViewer) ViewScript(
ctx context.Context,
input *BuildInput,
sf *ScriptFile,
a *alrsh.ALRSh,
basePkg string,
) error {
return cliutils.PromptViewScript(
ctx,
sf.Path,
a.Path(),
basePkg,
s.config.PagerStyle(),
input.opts.Interactive,