Expose source version modes in load options
This commit is contained in:
@@ -23,8 +23,12 @@ type Underlay struct{ Inputs []Input }
|
||||
// LayeredOptions selects lower-priority tiers and final application rules.
|
||||
// An active Overlay requires an explicit OverlayFilesystem; an inactive overlay
|
||||
// ignores it. Overrides remain explicit CLI records, not general mappings.
|
||||
// SourceVersionMode applies one declaration policy to main, underlay, import,
|
||||
// and selected overlay documents. Enabled modes interpret the version path
|
||||
// source-locally while protecting main's destination-prefixed path.
|
||||
type LayeredOptions[T any] struct {
|
||||
Definition Definition[T]
|
||||
SourceVersionMode SourceVersionMode
|
||||
Underlays []Underlay
|
||||
Overlay string
|
||||
OverlayFilesystem *FilesystemContext
|
||||
@@ -57,7 +61,9 @@ func toEngineInput(input Input) engine.Input {
|
||||
|
||||
func toEngineLayeredOptions[T any](options LayeredOptions[T]) engine.LayeredOptions[T] {
|
||||
result := engine.LayeredOptions[T]{
|
||||
Definition: toEngineDefinition(options.Definition), Overlay: options.Overlay,
|
||||
Definition: toEngineDefinition(options.Definition),
|
||||
SourceVersionMode: engine.SourceVersionModeFromFacade(uint8(options.SourceVersionMode)),
|
||||
Overlay: options.Overlay,
|
||||
OverlayFilesystem: toEngineFilesystemContext(options.OverlayFilesystem),
|
||||
}
|
||||
if options.Underlays != nil {
|
||||
|
||||
Reference in New Issue
Block a user