Render imported party rosters as canonical inputs

This commit is contained in:
2026-11-17 22:18:57 +00:00
parent 1657c9f65d
commit 05f5607968
10 changed files with 190 additions and 34 deletions

View File

@@ -4,8 +4,6 @@ import (
"fmt"
"path/filepath"
"strings"
"gitea.maximumdirect.net/eric/narratio/internal/fileops"
)
func resolvePartyInput(input ResolvedInputFile) (ResolvedParty, error) {
@@ -22,11 +20,7 @@ func resolvePartyInput(input ResolvedInputFile) (ResolvedParty, error) {
path = filepath.Join(filepath.Dir(configPath), path)
}
path = filepath.Clean(path)
raw, err := fileops.ReadFileBounded(path, maxConfigDocumentBytes)
if err != nil {
return ResolvedParty{}, fmt.Errorf("read party input %q: %w", path, err)
}
party, err := ParseParty(raw)
party, err := LoadParty(path)
if err != nil {
return ResolvedParty{}, fmt.Errorf("parse party input %q: %w", path, err)
}