src/_Resolve-CciGetFeed.ps1

function _Resolve-CciGetFeed {
    [CmdletBinding()]
    param(
        [string]$Tenant
    )
    $cfg = Get-CciGetConfig
    if (-not $cfg.feeds) { throw 'cciget: no feeds configured. Run Set-CciGetConfig.' }

    if ($Tenant) {
        $match = $cfg.feeds | Where-Object { $_.name -eq $Tenant }
        if (-not $match) { throw "cciget: tenant '$Tenant' is not in the configured feeds." }
        return ,@($match)
    }

    @($cfg.feeds | Where-Object { $_.enabled })
}