Gordon.psm1

$BinaryModulePath = "$PSScriptRoot\net8.0"

# Import the actual binary module
Import-Module "$BinaryModulePath\Eos.Gordon.PowerShell.dll" -DisableNameChecking -Global

# Load alias functions from the 'Aliases' folder
Get-ChildItem $PSScriptRoot\Aliases | ForEach-Object {
    . $_.FullName
}

# Because using 'Export-ModuleMember' above causes binary cmdlets to no longer be exported automatically, we need to so explicitly.
$BinaryCmdlets = [Eos.Gordon.PowerShell.Globals]::EnumerateCmdletNames()
Export-ModuleMember -Cmdlet $BinaryCmdlets

# .. and the same goes for Aliases
$BinaryAliases = [Eos.Gordon.PowerShell.Globals]::EnumerateCmdletAliases()
Export-ModuleMember -Alias $BinaryAliases