openupm / openupm-cli

The OpenUPM-CLI is a command-line interface for maintaining UPM registries.
https://openupm.com
BSD 3-Clause "New" or "Revised" License
244 stars 13 forks source link

refacor: split upm config type #379

Closed ComradeVanti closed 3 months ago

ComradeVanti commented 3 months ago

Currently the UPMConfig type represents the file content of a upmconfig.toml file. Since the datatype has the same structure as the file, the whole application has to be somewhat designed around it, which can be cumbersome.

This change splits this type into two, one (UpmConfigContent) still represents the file, but UpmConfig now only holds the auth information in a easier to access format. This makes it`s usage simpler in the service layer of the app. To compensate a translation or import/export logic was added to the io layer for converting between the two representations.