business-applications/Build.ps1

#
# SailPoint Identity Security API - Business Applications
# Use these APIs to interact with the SailPoint Identity Security platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.
# Version: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

function Get-FunctionsToExport {
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
        [ValidateNotNullOrEmpty()]
        [Alias('FullName')]
        $Path
    )

    Process {
        $Token = $null
        $ParserErr = $null

        $Ast = [System.Management.Automation.Language.Parser]::ParseFile(
            $Path,
            [ref]$Token,
            [ref]$ParserErr
        )

        if ($ParserErr) {
            throw $ParserErr
        } else {
            foreach ($name in 'Begin', 'Process', 'End') {
                foreach ($Statement in $Ast."${name}Block".Statements) {
                    if (
                        [String]::IsNullOrWhiteSpace($Statement.Name) -or
                        $Statement.Extent.ToString() -notmatch
                        ('function\W+{0}' -f $Statement.Name)
                    ) {
                        continue
                    }

                    $Statement.Name
                }
            }
        }
    }
}

$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$FunctionPath = "$PSScriptRoot/src/PSSailpoint.BusinessApplications/Api", "$PSScriptRoot/src/PSSailpoint.BusinessApplications/Client","$PSScriptRoot/src/PSSailpoint.BusinessApplications/Model" | ForEach-Object { $_ }


$Manifest = @{
    Path = "$ScriptDir\src\PSSailpoint.BusinessApplications\PSSailpoint.BusinessApplications.psd1"

    Author = 'OpenAPI Generator Team'
    CompanyName = 'SailPoint Technologies'
    Description = 'PSSailpoint.BusinessApplications - the PowerShell module for SailPoint Identity Security API - Business Applications'

    ModuleVersion = '2.1.75'

    RootModule = 'PSSailpoint.BusinessApplications.psm1'
    Guid = '27ED9D6C-80A1-A7B6-5138-5E9BF51A3FA4' # Has to be static, otherwise each new build will be considered different module

    PowerShellVersion = '6.2'

    FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport

    VariablesToExport = @()
    AliasesToExport = @()
    CmdletsToExport = @()

}

New-ModuleManifest @Manifest