_get-package-commands.ps1

#Requires -PSEdition Core
#Requires -Version 7.2
<#
This script is use for debug, and help to copy commands to hugoalh.GitHubActionsToolkit.psd1 file (for best performance).
#>

Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'hugoalh.GitHubActionsToolkit.psm1') -Scope 'Local'
[PSCustomObject[]]$PackageCommands = Get-Command -Module 'hugoalh.GitHubActionsToolkit' -ListImported
ForEach ($CommandType In @('Function', 'Alias')) {
    Set-Clipboard -Value ($PackageCommands | Where-Object -FilterScript { Return ($_.CommandType -ieq $CommandType) } | Select-Object -ExpandProperty 'Name' | Sort-Object | Join-String -Separator ",`n" -SingleQuote) -Confirm
}