AL/Get-ALDependencies.ps1

function Get-ALDependencies {
    param (
        [Parameter(Mandatory = $false)]
        [string] $SourcePath = (Get-Location),
        [Parameter(Mandatory = $false)]
        [string] $devOpsToken = "",
        [Parameter(Mandatory = $false)]
        [string] $ContainerName = "",
        [switch] $skipVerification,
        [switch] $Install,
        [switch] $TenantScope
    )
    
    if ($ContainerName -eq "") {
        $ContainerName = (Get-EnvironmentKeyValue -KeyName 'name')
    }

    if ($devOpsToken -eq "") {
        $devOpsToken = Get-EnvironmentKeyvalue -KeyName "token"
    }

    if (!([IO.Directory]::Exists((Join-Path $SourcePath ".alpackages")))) {
        New-Item -Path $SourcePath -Name ".alpackages" -ItemType Directory | out-Null
    }
    
    $appJson = (Get-Content (Join-Path $SourcePath "app.json") | ConvertFrom-Json)
    # currently, set this to true, since it seems that the latest docker image does not have the apps codesigned.
    Get-ALDependenciesFromAppJson -appJson $appJson -sourcePath $SourcePath -containerName $containerName -skipVerification -Install:$Install -TenantScope:$TenantScope -devOpsToken $devOpsToken
}
Export-ModuleMember Get-ALDependencies