Move the memory profile repository into the profile package

This commit is contained in:
2026-09-22 04:30:02 +00:00
parent ff73104f7e
commit c892eacb65
8 changed files with 195 additions and 51 deletions

View File

@@ -314,7 +314,11 @@ func WithFallbackProfileFS(fsys fs.FS, root string) Option {
// earlier in-memory set rather than merging it.
func WithProfiles(profiles ...Profile) Option {
return optionFunc(func(options *engineOptions) error {
repo, err := newMemoryProfileRepository(profiles)
definitions := make([]domain.ExecutionProfile, len(profiles))
for index, publicProfile := range profiles {
definitions[index] = toDomainProfile(publicProfile)
}
repo, err := profile.NewMemoryRepository(definitions)
if err != nil {
return err
}