From 45b7153cec303ad366753dd394fb283768f4e625 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Thu, 12 Sep 2024 13:55:46 +0530 Subject: [PATCH 01/13] PSV2 task --- .../Common/VstsAzureHelpers_/AzDoHelpers.ps1 | 45 +++++++++++++++++++ .../VstsAzureHelpers_/VstsAzureHelpers_.psm1 | 2 + Tasks/PowerShellV2/make.json | 4 ++ Tasks/PowerShellV2/powershell.ps1 | 2 +- Tasks/PowerShellV2/powershell.ts | 11 ++++- _generated/PowerShellV2/make.json | 4 ++ _generated/PowerShellV2/powershell.ps1 | 2 +- _generated/PowerShellV2/powershell.ts | 33 +++++++++++++- _generated/PowerShellV2_Node20/make.json | 4 ++ _generated/PowerShellV2_Node20/powershell.ps1 | 2 +- _generated/PowerShellV2_Node20/powershell.ts | 33 +++++++++++++- make.js | 5 ++- 12 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 diff --git a/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 b/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 new file mode 100644 index 000000000000..ecd045d66908 --- /dev/null +++ b/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 @@ -0,0 +1,45 @@ +function Get-AzDOToken { + + $connectionServiceName = Get-VstsInput - Name "ConnectedServiceName" + + Write-Host $connectionServiceName + + if ([string]::IsNullOrEmpty($connectionServiceName)) { + return System.AccessToken + } + + $endpoint = Get-VstsEndpoint -Name $connectionServiceName + + Write-Host $endpoint + + if ($endpoint.Auth.Scheme -ne 'WorkloadIdentityFederation ') { + Write-Error 'Connected service is not of type Workload Identity Federation' + throw + } + + # Generate Azure access token + $tokenRequestBody = @{ + resource = "https://management.azure.com/" + client_id = $endpoint.Auth.Parameters.ClientId + client_secret = $endpoint.Auth.Parameters.ClientSecret + grant_type = "client_credentials" + } + + $TenantId = $endpoint.Auth.Parameters.TenantId + $ServicePrincipalId = $endpoint.Auth.Parameters.ServicePrincipalId + + $tokenResponse = Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/$(TenantId)/oauth2/token" -ContentType "application/x-www-form-urlencoded" -Body $tokenRequestBody + + Write-Host $tokenResponse + + $AzureAccessToken = $tokenResponse.access_token + + Write-Host $AzureAccessToken + + Connect-AzAccount -AccessToken $AzureAccessToken -TenantId $TenantId -AccountId $ServicePrincipalId + $Token = Get-AzAccessToken -ResourceUrl "499b84ac-1321-427f-aa17-267ca6975798" + + Write-Host $Token + + return $Token.token +} \ No newline at end of file diff --git a/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 b/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 index 5d467bd5fe28..48bf83899426 100644 --- a/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 +++ b/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 @@ -28,6 +28,7 @@ if (-not $featureFlags.retireAzureRM) { . $PSScriptRoot/InitializeFunctions.ps1 . $PSScriptRoot/InitializeAzModuleFunctions.ps1 . $PSScriptRoot/PsModuleUtility.ps1 +. $PSScriptRoot/AzDoHelpers.ps1 # This is the only public function. function Initialize-Azure { @@ -96,3 +97,4 @@ if (-not $featureFlags.retireAzureRM) { Export-ModuleMember -Function Initialize-AzModule Export-ModuleMember -Function Disconnect-AzureAndClearContext Export-ModuleMember -Function Update-PSModulePathForHostedAgentWithLatestModule +Export-ModuleMember -Function Get-AzDOToken diff --git a/Tasks/PowerShellV2/make.json b/Tasks/PowerShellV2/make.json index f73f080ea9de..877303e646fe 100644 --- a/Tasks/PowerShellV2/make.json +++ b/Tasks/PowerShellV2/make.json @@ -28,6 +28,10 @@ { "module": "../Common/Sanitizer", "type": "ps" + }, + { + "module": "../Common/VstsAzureHelpers_", + "type": "ps" } ] } diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 93ecb6176f31..3aa4ffa99a23 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -8,7 +8,7 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer function Get-ActionPreference { param ( [Parameter(Mandatory)] - [string] + [string] $VstsInputName, [Parameter()] diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 2dd7239acf38..9d3daa27c6b6 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -6,6 +6,7 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; +import { execSync } from 'child_process'; var uuidV4 = require('uuid/v4'); function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { @@ -21,7 +22,6 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def async function run() { try { tl.setResourcePath(path.join(__dirname, 'task.json')); - // Get inputs. let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -76,6 +76,12 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } + const directory1: string = process.cwd(); + const directory2: string = path.resolve(); + + console.log(directory1); + console.log(directory2); + let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { @@ -109,6 +115,7 @@ async function run() { } } }; + Get-ChildItem -Recurse $PSScriptRoot | Select Fullname Invoke-Command {${script}} -WarningVariable +warnings; `; } @@ -176,6 +183,8 @@ async function run() { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_ExitCode', exitCode)); } + + // Fail on stderr. if (stderrFailure) { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_Stderr')); diff --git a/_generated/PowerShellV2/make.json b/_generated/PowerShellV2/make.json index f73f080ea9de..877303e646fe 100644 --- a/_generated/PowerShellV2/make.json +++ b/_generated/PowerShellV2/make.json @@ -28,6 +28,10 @@ { "module": "../Common/Sanitizer", "type": "ps" + }, + { + "module": "../Common/VstsAzureHelpers_", + "type": "ps" } ] } diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 93ecb6176f31..3aa4ffa99a23 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -8,7 +8,7 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer function Get-ActionPreference { param ( [Parameter(Mandatory)] - [string] + [string] $VstsInputName, [Parameter()] diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index 2dd7239acf38..2f5f3069ca20 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -6,6 +6,7 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; +import { execSync } from 'child_process'; var uuidV4 = require('uuid/v4'); function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { @@ -18,10 +19,31 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } +// Function to execute PowerShell commands +function runPowerShellScript(scriptPath: string): void { + const fullScriptPath = path.join(__dirname, scriptPath); + + try { + // Execute the PowerShell script, making cmdlets available to the pipeline + const output = execSync(`powershell -Command "Import-Module $PSScriptRoot\\ps_modules\\VstsAzureHelpers_"`); + console.log(output.toString()); + } catch (error) { + console.error(`Error running PowerShell script: ${error.message}`); + } +} + +// Main function to run when the task is executed +function runTask() { + // Inject the custom cmdlet by running the script that defines it + runPowerShellScript('powershell.ps1'); + + console.log("PowerShell cmdlet injected successfully."); +} + async function run() { try { tl.setResourcePath(path.join(__dirname, 'task.json')); - + // runTask() // Get inputs. let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -76,6 +98,12 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } + const directory1: string = process.cwd(); + const directory2: string = path.resolve(); + + console.log(directory1); + console.log(directory2); + let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { @@ -109,6 +137,7 @@ async function run() { } } }; + Get-ChildItem -Recurse $PSScriptRoot | Select Fullname Invoke-Command {${script}} -WarningVariable +warnings; `; } @@ -176,6 +205,8 @@ async function run() { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_ExitCode', exitCode)); } + + // Fail on stderr. if (stderrFailure) { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_Stderr')); diff --git a/_generated/PowerShellV2_Node20/make.json b/_generated/PowerShellV2_Node20/make.json index f73f080ea9de..877303e646fe 100644 --- a/_generated/PowerShellV2_Node20/make.json +++ b/_generated/PowerShellV2_Node20/make.json @@ -28,6 +28,10 @@ { "module": "../Common/Sanitizer", "type": "ps" + }, + { + "module": "../Common/VstsAzureHelpers_", + "type": "ps" } ] } diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 93ecb6176f31..3aa4ffa99a23 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -8,7 +8,7 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer function Get-ActionPreference { param ( [Parameter(Mandatory)] - [string] + [string] $VstsInputName, [Parameter()] diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index 2dd7239acf38..2f5f3069ca20 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -6,6 +6,7 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; +import { execSync } from 'child_process'; var uuidV4 = require('uuid/v4'); function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { @@ -18,10 +19,31 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } +// Function to execute PowerShell commands +function runPowerShellScript(scriptPath: string): void { + const fullScriptPath = path.join(__dirname, scriptPath); + + try { + // Execute the PowerShell script, making cmdlets available to the pipeline + const output = execSync(`powershell -Command "Import-Module $PSScriptRoot\\ps_modules\\VstsAzureHelpers_"`); + console.log(output.toString()); + } catch (error) { + console.error(`Error running PowerShell script: ${error.message}`); + } +} + +// Main function to run when the task is executed +function runTask() { + // Inject the custom cmdlet by running the script that defines it + runPowerShellScript('powershell.ps1'); + + console.log("PowerShell cmdlet injected successfully."); +} + async function run() { try { tl.setResourcePath(path.join(__dirname, 'task.json')); - + // runTask() // Get inputs. let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -76,6 +98,12 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } + const directory1: string = process.cwd(); + const directory2: string = path.resolve(); + + console.log(directory1); + console.log(directory2); + let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { @@ -109,6 +137,7 @@ async function run() { } } }; + Get-ChildItem -Recurse $PSScriptRoot | Select Fullname Invoke-Command {${script}} -WarningVariable +warnings; `; } @@ -176,6 +205,8 @@ async function run() { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_ExitCode', exitCode)); } + + // Fail on stderr. if (stderrFailure) { tl.setResult(tl.TaskResult.Failed, tl.loc('JS_Stderr')); diff --git a/make.js b/make.js index 8915743f84ea..f7913b421973 100644 --- a/make.js +++ b/make.js @@ -330,7 +330,10 @@ async function buildTaskAsync(taskName, taskListLength, nodeVersion, isServerBui var modName = path.basename(modPath); var modOutDir = path.join(buildTasksCommonPath, modName); - if (!test('-d', modOutDir)) { + console.log('Common Module : {modPath = ' + modPath + " , modName = " + modName + " , modOutDir = " + modOutDir) + console.log(test('-d', modOutDir)) + if (test('-d', modOutDir)) { + banner('Building module ' + modPath, true); // Ensure that Common folder exists for _generated tasks, otherwise copy it from Tasks folder From bd9a31b8f5418564487e857e60905eb6b24f7fb3 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Tue, 24 Sep 2024 10:57:04 +0530 Subject: [PATCH 02/13] Do not review --- .../Common/VstsAzureHelpers_/AzDoHelpers.ps1 | 73 ++-- .../VstsAzureRestHelpers_.psm1 | 72 +++- .../_buildConfigs/Node20/package-lock.json | 384 ++++++++++++++++++ .../_buildConfigs/Node20/package.json | 3 + Tasks/PowerShellV2/make.json | 12 +- Tasks/PowerShellV2/package-lock.json | 307 ++++++++++++++ Tasks/PowerShellV2/package.json | 3 + Tasks/PowerShellV2/powershell.ts | 32 +- Tasks/PowerShellV2/task.json | 14 +- Tasks/PowerShellV2/task.loc.json | 14 +- _generated/PowerShellV2/make.json | 12 +- 11 files changed, 869 insertions(+), 57 deletions(-) diff --git a/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 b/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 index ecd045d66908..d0188967c568 100644 --- a/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 +++ b/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 @@ -1,45 +1,54 @@ -function Get-AzDOToken { - - $connectionServiceName = Get-VstsInput - Name "ConnectedServiceName" - - Write-Host $connectionServiceName - - if ([string]::IsNullOrEmpty($connectionServiceName)) { +function Get-AzDOToken() +{ + $connectionServiceName = $env:AZURESUBSCRIPTION_SERVICE_CONNECTION_ID + $servicePrincipalId = $env:AZURESUBSCRIPTION_CLIENT_ID + $tenantId = $env:AZURESUBSCRIPTION_TENANT_ID + $activeDirectoryAuthority = "https://login.microsoftonline.com/$tenantId/" + $vstsAccessToken = $env:VSTS_ACCESS_TOKEN + $scheme = "WorkloadIdentityFederation" + + if ($null -eq $connectionServiceName -or $connectionServiceName -eq "") { + Write-Host "Returning System.AccessToken" return System.AccessToken - } - - $endpoint = Get-VstsEndpoint -Name $connectionServiceName - - Write-Host $endpoint - - if ($endpoint.Auth.Scheme -ne 'WorkloadIdentityFederation ') { - Write-Error 'Connected service is not of type Workload Identity Federation' - throw } - # Generate Azure access token - $tokenRequestBody = @{ - resource = "https://management.azure.com/" - client_id = $endpoint.Auth.Parameters.ClientId - client_secret = $endpoint.Auth.Parameters.ClientSecret - grant_type = "client_credentials" + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null } - $TenantId = $endpoint.Auth.Parameters.TenantId - $ServicePrincipalId = $endpoint.Auth.Parameters.ServicePrincipalId + Import-Module $PSScriptRoot/../../ps_modules/VstsAzureRestHelpers_ -Force - $tokenResponse = Invoke-RestMethod -Method Post -Uri "https://login.microsoftonline.com/$(TenantId)/oauth2/token" -ContentType "application/x-www-form-urlencoded" -Body $tokenRequestBody + $parameters = @{ + TenantId = $tenantId + ServicePrincipalId = $servicePrincipalId + } - Write-Host $tokenResponse + $auth = @{ + Scheme = $scheme + Parameters = $parameters + } + + $data = @{ + activeDirectoryAuthority = $activeDirectoryAuthority + } - $AzureAccessToken = $tokenResponse.access_token + $vstsEndpoint = @{ + Auth = $auth + Data = $data + } - Write-Host $AzureAccessToken + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectionServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" ` + -vstsAccessToken $vstsAccessToken - Connect-AzAccount -AccessToken $AzureAccessToken -TenantId $TenantId -AccountId $ServicePrincipalId - $Token = Get-AzAccessToken -ResourceUrl "499b84ac-1321-427f-aa17-267ca6975798" + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() - Write-Host $Token + Write-Host "Get-connectionServiceNameAccessToken: Received accessToken"; - return $Token.token + return $accessToken; } \ No newline at end of file diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index 66561b785c08..bd26f0561eae 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -163,7 +163,12 @@ function Get-EnvironmentAuthUrl { [Parameter(Mandatory = $false)] $useMSAL = $false ) - $envAuthUrl = if ($useMSAL) { $endpoint.Data.activeDirectoryAuthority } else { $endpoint.Data.environmentAuthorityUrl } + $stringOb = $endpoint | Out-String + Write-Host $stringOb + Write-Host $endpoint.Data + Write-Host $endpoint.Data.activeDirectoryAuthority + + $envAuthUrl = if ($useMSAL) { $endpoint.Data.activeDirectoryAuthority } else { $endpoint.Data.environmentAuthorityUrl } if ([string]::IsNullOrEmpty($envAuthUrl)) { if (($endpoint.Data.Environment) -and ($endpoint.Data.Environment -eq $azureStack)) { @@ -178,9 +183,9 @@ function Get-EnvironmentAuthUrl { } } - Write-Verbose "MSAL - Get-EnvironmentAuthUrl - endpoint=$endpoint" - Write-Verbose "MSAL - Get-EnvironmentAuthUrl - useMSAL=$useMSAL" - Write-Verbose "MSAL - Get-EnvironmentAuthUrl - envAuthUrl=$envAuthUrl" + Write-Host "MSAL - Get-EnvironmentAuthUrl - endpoint=$endpoint" + Write-Host "MSAL - Get-EnvironmentAuthUrl - useMSAL=$useMSAL" + Write-Host "MSAL - Get-EnvironmentAuthUrl - envAuthUrl=$envAuthUrl" return $envAuthUrl } @@ -357,12 +362,16 @@ function Build-MSALInstance { [CmdletBinding()] param( [Parameter(Mandatory = $true)] $endpoint, - [string][Parameter(Mandatory=$false)] $connectedServiceNameARM + [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, + [string][Parameter(Mandatory=$false)] $vstsAccessToken ) $clientId = $endpoint.Auth.Parameters.ServicePrincipalId + Write-Host $clientId $tenantId = $endpoint.Auth.Parameters.TenantId + Write-Host $tenantId $envAuthUrl = Get-EnvironmentAuthUrl -endpoint $endpoint -useMSAL $true + Write-Host $envAuthUrl try { # load the MSAL library @@ -370,7 +379,7 @@ function Build-MSALInstance { $clientBuilder = [Microsoft.Identity.Client.ConfidentialClientApplicationBuilder]::Create($clientId).WithAuthority($envAuthUrl, $tenantId) - if ($Endpoint.Auth.Parameters.AuthenticationType -eq 'SPNCertificate') { + if ($endpoint.Auth.Parameters.AuthenticationType -eq 'SPNCertificate') { Write-Verbose "MSAL - ServicePrincipal - certificate is used."; $pemFileContent = $endpoint.Auth.Parameters.ServicePrincipalCertificate @@ -381,8 +390,10 @@ function Build-MSALInstance { elseif ($endpoint.Auth.Scheme -eq $wifConnection) { Write-Verbose "MSAL - WorkloadIdentityFederation is used"; - $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require - $vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken + if ([string]::IsNullOrWhiteSpace($vstsAccessToken)) { + $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require + $vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken + } $oidc_token = Get-VstsFederatedToken -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken @@ -408,12 +419,13 @@ function Get-MSALInstance { [CmdletBinding()] param( [Parameter(Mandatory = $true)] $endpoint, - [string][Parameter(Mandatory=$false)] $connectedServiceNameARM + [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, + [string][Parameter(Mandatory=$false)] $vstsAccessToken ) # build MSAL if instance does not exist if ($null -eq $script:msalClientInstance) { - $script:msalClientInstance = Build-MSALInstance $endpoint $connectedServiceNameARM + $script:msalClientInstance = Build-MSALInstance $endpoint $connectedServiceNameARM $vstsAccessToken } return $script:msalClientInstance @@ -1290,6 +1302,7 @@ function Get-AzureLoadBalancerDetails { } function Get-AzureRMLoadBalancerFrontendIpConfigDetails { + [CmdletBinding()] param([Object] [Parameter(Mandatory = $true)] $loadBalancer) @@ -1439,6 +1452,42 @@ function Get-VstsFederatedToken { return $federatedToken } +# Get the Bearer Access Token - MSAL +function Get-AccessTokenMSALWithCustomScope { + [CmdletBinding()] + param( + [Parameter(Mandatory = $true)] $endpoint, + [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, + [string][Parameter(Mandatory=$false)] $scope, + [string][Parameter(Mandatory=$false)] $vstsAccessToken + ) + + if ([string]::IsNullOrWhiteSpace($vstsAccessToken)) { + Get-MSALInstance $endpoint $connectedServiceNameARM + } else { + Write-Host "yo" + Get-MSALInstance $endpoint $connectedServiceNameARM $vstsAccessToken + } + + # prepare MSAL scopes + [string] $resourceId = $scope + "/.default" + $scopes = [Collections.Generic.List[string]]@($resourceId) + try { + Write-Verbose "Fetching Access Token - MSAL" + $tokenResult = $script:msalClientInstance.AcquireTokenForClient($scopes).ExecuteAsync().GetAwaiter().GetResult() + return $tokenResult + } + catch { + $exceptionMessage = $_.Exception.Message.ToString() + $parsedException = Parse-Exception($_.Exception) + if ($parsedException) { + $exceptionMessage = $parsedException + } + Write-Error "ExceptionMessage: $exceptionMessage (in function: Get-AccessTokenMSAL)" + throw (Get-VstsLocString -Key AZ_SpnAccessTokenFetchFailure -ArgumentList $endpoint.Auth.Parameters.TenantId) + } +} + # Export only the public function. Export-ModuleMember -Function Add-AzureSqlDatabaseServerFirewallRule Export-ModuleMember -Function Remove-AzureSqlDatabaseServerFirewallRule @@ -1455,4 +1504,5 @@ Export-ModuleMember -Function Get-AzureLoadBalancersDetails Export-ModuleMember -Function Get-AzureLoadBalancerDetails Export-ModuleMember -Function Get-AzureRMLoadBalancerFrontendIpConfigDetails Export-ModuleMember -Function Get-AzureRMLoadBalancerInboundNatRuleConfigDetails -Export-ModuleMember -Function Get-AzureRMAccessToken \ No newline at end of file +Export-ModuleMember -Function Get-AzureRMAccessToken +Export-ModuleMember -Function Get-AccessTokenMSALWithCustomScope \ No newline at end of file diff --git a/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json b/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json index 9ef07eaad521..096d479dbff4 100644 --- a/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json +++ b/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json @@ -11,7 +11,10 @@ "dependencies": { "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", + "@types/q": "1.0.7", + "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", "azure-pipelines-tasks-utility-common": "^3.235.0", "uuid": "^3.0.1" }, @@ -19,6 +22,22 @@ "typescript": "5.1.6" } }, + "node_modules/@azure/msal-common": { + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", + "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/mocha": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", @@ -32,6 +51,11 @@ "undici-types": "~6.19.2" } }, + "node_modules/@types/q": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", + "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + }, "node_modules/@types/semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", @@ -69,6 +93,41 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/azure-devops-node-api": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", + "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^2.0.1" + }, + "engines": { + "node": ">= 16.0.0" + } + }, + "node_modules/azure-devops-node-api/node_modules/typed-rest-client": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", + "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "dependencies": { + "des.js": "^1.1.0", + "js-md4": "^0.3.2", + "qs": "^6.10.3", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + }, + "engines": { + "node": ">= 16.0.0" + } + }, "node_modules/azure-pipelines-task-lib": { "version": "4.16.0", "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", @@ -83,6 +142,73 @@ "uuid": "^3.0.1" } }, + "node_modules/azure-pipelines-tasks-azure-arm-rest": { + "version": "3.242.2", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.242.2.tgz", + "integrity": "sha512-ljPHxC07BIMH9f3EP0+Rd86CCH+GX3TeDoULa1hCQUoMYrSfvx+Q5ywxoMp9riB78h9aUZf93CPuuVc79naUgg==", + "dependencies": { + "@types/jsonwebtoken": "^8.5.8", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.5.4", + "async-mutex": "^0.4.0", + "azure-devops-node-api": "^14.0.1", + "azure-pipelines-task-lib": "^4.11.0", + "https-proxy-agent": "^4.0.0", + "jsonwebtoken": "^9.0.0", + "msalv1": "npm:@azure/msal-node@^1.18.4", + "msalv2": "npm:@azure/msal-node@^2.7.0", + "node-fetch": "^2.6.7", + "q": "1.5.1", + "typed-rest-client": "^2.0.1", + "xml2js": "0.6.2" + } + }, + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + }, + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "dependencies": { + "agent-base": "5", + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/typed-rest-client": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", + "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "dependencies": { + "des.js": "^1.1.0", + "js-md4": "^0.3.2", + "qs": "^6.10.3", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + }, + "engines": { + "node": ">= 16.0.0" + } + }, "node_modules/azure-pipelines-tasks-utility-common": { "version": "3.242.0", "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.242.0.tgz", @@ -128,6 +254,11 @@ "concat-map": "0.0.1" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -183,6 +314,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -399,6 +547,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + }, "node_modules/js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -411,6 +564,92 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -430,6 +669,11 @@ "node": ">= 0.6" } }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -446,6 +690,78 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/msalv1": { + "name": "@azure/msal-node", + "version": "1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "deprecated": "A newer major version of this library is available. Please upgrade to the latest available version.", + "dependencies": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" + } + }, + "node_modules/msalv1/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/msalv2": { + "name": "@azure/msal-node", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.10.0.tgz", + "integrity": "sha512-JxsSE0464a8IA/+q5EHKmchwNyUFJHtCH00tSXsLaOddwLjG6yVvTH6lGgPcWMhO7YWUXj/XVgVgeE9kZtsPUQ==", + "dependencies": { + "@azure/msal-common": "14.13.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/msalv2/node_modules/@azure/msal-common": { + "version": "14.13.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.13.0.tgz", + "integrity": "sha512-b4M/tqRzJ4jGU91BiwCsLTqChveUEyFK3qY2wGfZ0zBswIBZjAxopx5CYt5wzZFKuN15HqRDYXQbztttuIC3nA==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/msalv2/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", @@ -540,6 +856,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", @@ -548,6 +883,11 @@ "truncate-utf8-bytes": "^1.0.0" } }, + "node_modules/sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, "node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -626,6 +966,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -634,6 +979,11 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -689,10 +1039,44 @@ "uuid": "bin/uuid" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "engines": { + "node": ">=4.0" + } } } } diff --git a/Tasks/PowerShellV2/_buildConfigs/Node20/package.json b/Tasks/PowerShellV2/_buildConfigs/Node20/package.json index fbbd8d7a29f7..8166aa387af5 100644 --- a/Tasks/PowerShellV2/_buildConfigs/Node20/package.json +++ b/Tasks/PowerShellV2/_buildConfigs/Node20/package.json @@ -16,8 +16,11 @@ "dependencies": { "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", + "@types/q": "1.0.7", + "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", "uuid": "^3.0.1" }, "devDependencies": { diff --git a/Tasks/PowerShellV2/make.json b/Tasks/PowerShellV2/make.json index 877303e646fe..4e8270620a89 100644 --- a/Tasks/PowerShellV2/make.json +++ b/Tasks/PowerShellV2/make.json @@ -19,7 +19,9 @@ { "items": [ "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", - "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib" ], "options": "-Rf" } @@ -32,6 +34,14 @@ { "module": "../Common/VstsAzureHelpers_", "type": "ps" + }, + { + "module": "../Common/VstsAzureRestHelpers_", + "type": "ps" + }, + { + "module": "../Common/TlsHelper_", + "type": "ps" } ] } diff --git a/Tasks/PowerShellV2/package-lock.json b/Tasks/PowerShellV2/package-lock.json index e05991c5de66..fa268c75724c 100644 --- a/Tasks/PowerShellV2/package-lock.json +++ b/Tasks/PowerShellV2/package-lock.json @@ -4,6 +4,19 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/msal-common": { + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", + "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==" + }, + "@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "requires": { + "@types/node": "*" + } + }, "@types/mocha": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", @@ -14,6 +27,11 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.64.tgz", "integrity": "sha512-z5hPTlVFzNwtJ2LNozTpJcD1Cu44c4LNuzaq1mwxmiHWQh2ULdR6Vjwo1UGldzRpzL0yUEdZddnfqGW2G70z6Q==" }, + "@types/q": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", + "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + }, "@types/semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", @@ -45,6 +63,37 @@ "sprintf-js": "~1.0.2" } }, + "async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "requires": { + "tslib": "^2.4.0" + } + }, + "azure-devops-node-api": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", + "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^2.0.1" + }, + "dependencies": { + "typed-rest-client": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", + "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "requires": { + "des.js": "^1.1.0", + "js-md4": "^0.3.2", + "qs": "^6.10.3", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } + } + }, "azure-pipelines-task-lib": { "version": "4.16.0", "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", @@ -59,6 +108,98 @@ "uuid": "^3.0.1" } }, + "azure-pipelines-tasks-azure-arm-rest": { + "version": "3.242.2", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.242.2.tgz", + "integrity": "sha512-ljPHxC07BIMH9f3EP0+Rd86CCH+GX3TeDoULa1hCQUoMYrSfvx+Q5ywxoMp9riB78h9aUZf93CPuuVc79naUgg==", + "requires": { + "@types/jsonwebtoken": "^8.5.8", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.5.4", + "async-mutex": "^0.4.0", + "azure-devops-node-api": "^14.0.1", + "azure-pipelines-task-lib": "^4.11.0", + "https-proxy-agent": "^4.0.0", + "jsonwebtoken": "^9.0.0", + "msalv1": "npm:@azure/msal-node@^1.18.4", + "msalv2": "npm:@azure/msal-node@^2.7.0", + "node-fetch": "^2.6.7", + "q": "1.5.1", + "typed-rest-client": "^2.0.1", + "xml2js": "0.6.2" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + }, + "agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" + }, + "https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "requires": { + "agent-base": "5", + "debug": "4" + } + }, + "msalv1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "msalv2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + } + } + }, + "typed-rest-client": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", + "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "requires": { + "des.js": "^1.1.0", + "js-md4": "^0.3.2", + "qs": "^6.10.3", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, "azure-pipelines-tasks-utility-common": { "version": "3.235.0", "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.235.0.tgz", @@ -99,6 +240,11 @@ "concat-map": "0.0.1" } }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -134,6 +280,23 @@ "gopd": "^1.0.1" } }, + "des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -279,6 +442,11 @@ "hasown": "^2.0.2" } }, + "js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -288,6 +456,84 @@ "esprima": "^4.0.0" } }, + "jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + } + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -301,6 +547,11 @@ "mime-db": "1.52.0" } }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, "minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -314,6 +565,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, "nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", @@ -379,6 +638,11 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, "sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", @@ -387,6 +651,11 @@ "truncate-utf8-bytes": "^1.0.0" } }, + "sax": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" + }, "semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -441,6 +710,11 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, "truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -449,6 +723,11 @@ "utf8-byte-length": "^1.0.1" } }, + "tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -485,10 +764,38 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" } } } diff --git a/Tasks/PowerShellV2/package.json b/Tasks/PowerShellV2/package.json index ea59607adf8e..4264ced9d267 100644 --- a/Tasks/PowerShellV2/package.json +++ b/Tasks/PowerShellV2/package.json @@ -16,8 +16,11 @@ "dependencies": { "@types/mocha": "^5.2.7", "@types/node": "^16.11.39", + "@types/q": "1.0.7", + "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", "uuid": "^3.0.1" }, "devDependencies": { diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 9d3daa27c6b6..3320833d6538 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -7,6 +7,7 @@ import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; import { execSync } from 'child_process'; +import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint'; var uuidV4 = require('uuid/v4'); function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { @@ -19,17 +20,38 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } +function setUpConnectedServiceEnvironmentVariables() { + var connectedService = tl.getInput('ConnectedServiceName'); + if(connectedService) { + var authScheme: string = tl.getEndpointAuthorizationScheme(connectedService, false); + if (authScheme && authScheme.toLowerCase() == "workloadidentityfederation") { + process.env.AZURESUBSCRIPTION_SERVICE_CONNECTION_ID = connectedService; + process.env.AZURESUBSCRIPTION_CLIENT_ID = tl.getEndpointAuthorizationParameter(connectedService, "serviceprincipalid", false); + process.env.AZURESUBSCRIPTION_TENANT_ID = tl.getEndpointAuthorizationParameter(connectedService, "tenantid", false); + process.env.VSTS_ACCESS_TOKEN = tl.getEndpointAuthorizationParameter('SystemVssConnection', 'AccessToken', false); + tl.debug('Environment variables AZURESUBSCRIPTION_SERVICE_CONNECTION_ID,AZURESUBSCRIPTION_CLIENT_ID and AZURESUBSCRIPTION_TENANT_ID are set'); + } + else { + tl.debug('Connected service is not of type Workload Identity Federation'); + } + } + else { + tl.debug('No connected service set'); + } +} + + async function run() { try { - tl.setResourcePath(path.join(__dirname, 'task.json')); // Get inputs. + + setUpConnectedServiceEnvironmentVariables(); let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); let input_informationPreference: string = getActionPreference('informationPreference', 'Default'); let input_verbosePreference: string = getActionPreference('verbosePreference', 'Default'); let input_debugPreference: string = getActionPreference('debugPreference', 'Default'); let input_progressPreference: string = getActionPreference('progressPreference', 'SilentlyContinue'); - let input_showWarnings = tl.getBoolInput('showWarnings', false); let input_failOnStderr = tl.getBoolInput('failOnStderr', false); let input_ignoreLASTEXITCODE = tl.getBoolInput('ignoreLASTEXITCODE', false); @@ -76,12 +98,6 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } - const directory1: string = process.cwd(); - const directory2: string = path.resolve(); - - console.log(directory1); - console.log(directory2); - let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 9cac46fb6ff8..0eebd509b7f1 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 0 + "Minor": 246, + "Patch": 20 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Resource Manager connection", + "defaultValue": "", + "helpMarkDown": "Select an Azure Resource Manager service connection" + }, { "name": "targetType", "type": "radio", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index e7a866aac2d2..6b0b38306d9f 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 0 + "Minor": 246, + "Patch": 20 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Resource Manager connection", + "defaultValue": "", + "helpMarkDown": "Select an Azure Resource Manager service connection" + }, { "name": "targetType", "type": "radio", diff --git a/_generated/PowerShellV2/make.json b/_generated/PowerShellV2/make.json index 877303e646fe..4e8270620a89 100644 --- a/_generated/PowerShellV2/make.json +++ b/_generated/PowerShellV2/make.json @@ -19,7 +19,9 @@ { "items": [ "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", - "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib" ], "options": "-Rf" } @@ -32,6 +34,14 @@ { "module": "../Common/VstsAzureHelpers_", "type": "ps" + }, + { + "module": "../Common/VstsAzureRestHelpers_", + "type": "ps" + }, + { + "module": "../Common/TlsHelper_", + "type": "ps" } ] } From 49a4f0e1dec0a0dad3450665215bb8a59f618a3c Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Tue, 15 Oct 2024 12:48:19 +0530 Subject: [PATCH 03/13] basic --- Tasks/PowerShellV2/Auth.ts | 85 ++ .../_buildConfigs/Node20/package-lock.json | 1328 +++++++++++++--- .../_buildConfigs/Node20/package.json | 9 +- Tasks/PowerShellV2/package-lock.json | 1128 +++++++++++--- Tasks/PowerShellV2/package.json | 11 +- Tasks/PowerShellV2/powershell.ts | 128 +- Tasks/PowerShellV2/task.json | 4 +- Tasks/PowerShellV2/task.loc.json | 4 +- Tasks/PowerShellV2/tsconfig.json | 12 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/Auth.ts | 85 ++ .../resources.resjson/en-US/resources.resjson | 2 + _generated/PowerShellV2/package-lock.json | 1105 +++++++++++++- _generated/PowerShellV2/package.json | 8 +- _generated/PowerShellV2/powershell.ts | 133 +- _generated/PowerShellV2/task.json | 18 +- _generated/PowerShellV2/task.loc.json | 18 +- _generated/PowerShellV2/tsconfig.json | 12 +- _generated/PowerShellV2_Node20/Auth.ts | 85 ++ .../resources.resjson/en-US/resources.resjson | 2 + _generated/PowerShellV2_Node20/make.json | 12 +- .../PowerShellV2_Node20/package-lock.json | 1348 ++++++++++++++++- _generated/PowerShellV2_Node20/package.json | 6 + _generated/PowerShellV2_Node20/powershell.ts | 133 +- _generated/PowerShellV2_Node20/task.json | 18 +- _generated/PowerShellV2_Node20/task.loc.json | 18 +- _generated/PowerShellV2_Node20/tsconfig.json | 12 +- 27 files changed, 5064 insertions(+), 664 deletions(-) create mode 100644 Tasks/PowerShellV2/Auth.ts create mode 100644 _generated/PowerShellV2/Auth.ts create mode 100644 _generated/PowerShellV2_Node20/Auth.ts diff --git a/Tasks/PowerShellV2/Auth.ts b/Tasks/PowerShellV2/Auth.ts new file mode 100644 index 000000000000..810a37507a91 --- /dev/null +++ b/Tasks/PowerShellV2/Auth.ts @@ -0,0 +1,85 @@ +import * as tl from "azure-pipelines-task-lib/task"; +import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; + +const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); +if(nodeVersion < 16) { + tl.error(tl.loc('NodeVersionSupport', nodeVersion)); +} + +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; + +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string +): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} \ No newline at end of file diff --git a/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json b/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json index 096d479dbff4..9c6a8f84d4c9 100644 --- a/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json +++ b/Tasks/PowerShellV2/_buildConfigs/Node20/package-lock.json @@ -9,13 +9,16 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", - "@types/q": "1.0.7", - "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", - "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "azure-pipelines-tasks-packaging-common": "^3.236.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { @@ -23,17 +26,51 @@ } }, "node_modules/@azure/msal-common": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", - "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==", + "version": "14.14.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.1.tgz", + "integrity": "sha512-2Q3tqNz/PZLfSr8BvcHZVpRRfSn4MjGSqjj9J+HlBsmbf1Uu4P0WeXnemjTJwwx9KrmplsrN3UkZ/LPOR720rw==", "engines": { "node": ">=0.8.0" } }, - "node_modules/@types/jsonwebtoken": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", - "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "node_modules/@azure/msal-node": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.0.tgz", + "integrity": "sha512-DhP97ycs7qlCVzzzWGzJiwAFyFj5okno74E4FUZ61oCLfKh4IxA1kxirqzrWuYZWpBe9HVPL6GA4NvmlEOBN5Q==", + "dependencies": { + "@azure/msal-common": "14.14.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@azure/msal-node/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@types/fs-extra": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz", + "integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "node_modules/@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", "dependencies": { "@types/node": "*" } @@ -51,11 +88,6 @@ "undici-types": "~6.19.2" } }, - "node_modules/@types/q": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", - "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" - }, "node_modules/@types/semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", @@ -66,6 +98,11 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.13.tgz", "integrity": "sha512-pAeZeUbLE4Z9Vi9wsWV2bYPTweEHeJJy0G4pEjOA/FSvy1Ad5U5Km8iDV6TKre1mjBiVNfAdVHKruP8bAh4Q5A==" }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, "node_modules/adm-zip": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.15.tgz", @@ -85,53 +122,66 @@ "node": ">= 6.0.0" } }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dependencies": { - "sprintf-js": "~1.0.2" + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" } }, - "node_modules/async-mutex": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", - "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", - "dependencies": { - "tslib": "^2.4.0" + "node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" } }, - "node_modules/azure-devops-node-api": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", - "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "tunnel": "0.0.6", - "typed-rest-client": "^2.0.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 16.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/azure-devops-node-api/node_modules/typed-rest-client": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", - "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dependencies": { - "des.js": "^1.1.0", - "js-md4": "^0.3.2", - "qs": "^6.10.3", - "tunnel": "0.0.6", - "underscore": "^1.12.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">= 16.0.0" + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/azure-devops-node-api": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", + "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, "node_modules/azure-pipelines-task-lib": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", - "integrity": "sha512-hjyDi5GI1cFmS2o6GzTFPqloeTZBeaTLOjPn/H3CVr0vV/MV+eYoWszVe9kn7XnRSiv22j3p4Rhw/Sy4v1okxA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.17.0.tgz", + "integrity": "sha512-WSopDnRAQAnxqKf7SEVHQS88NjCUNDQAc3qE6xqQWEwo8UeaK3UISxHXrVlaW0frjrgMhs3m+RhZPDlyIGYmhA==", "dependencies": { "adm-zip": "^0.5.10", "minimatch": "3.0.5", @@ -142,71 +192,107 @@ "uuid": "^3.0.1" } }, - "node_modules/azure-pipelines-tasks-azure-arm-rest": { - "version": "3.242.2", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.242.2.tgz", - "integrity": "sha512-ljPHxC07BIMH9f3EP0+Rd86CCH+GX3TeDoULa1hCQUoMYrSfvx+Q5ywxoMp9riB78h9aUZf93CPuuVc79naUgg==", + "node_modules/azure-pipelines-task-lib/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-artifacts-common": { + "version": "2.230.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz", + "integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==", "dependencies": { - "@types/jsonwebtoken": "^8.5.8", - "@types/mocha": "^5.2.7", - "@types/node": "^10.17.0", - "@types/q": "1.5.4", - "async-mutex": "^0.4.0", - "azure-devops-node-api": "^14.0.1", - "azure-pipelines-task-lib": "^4.11.0", - "https-proxy-agent": "^4.0.0", - "jsonwebtoken": "^9.0.0", - "msalv1": "npm:@azure/msal-node@^1.18.4", - "msalv2": "npm:@azure/msal-node@^2.7.0", - "node-fetch": "^2.6.7", - "q": "1.5.1", - "typed-rest-client": "^2.0.1", - "xml2js": "0.6.2" + "@types/fs-extra": "8.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "azure-devops-node-api": "12.0.0", + "azure-pipelines-task-lib": "^4.2.0", + "fs-extra": "8.1.0", + "semver": "6.3.0" } }, - "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + "node_modules/azure-pipelines-tasks-artifacts-common/node_modules/@types/node": { + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" }, - "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", - "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + "node_modules/azure-pipelines-tasks-artifacts-common/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } }, - "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", - "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", + "node_modules/azure-pipelines-tasks-packaging-common": { + "version": "3.244.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-3.244.0.tgz", + "integrity": "sha512-Xa37kvWCkN1ElUiUJI1sFAZ3iDu4d5LzCB5l1ElWD9D1loKqIvSY+hM9oQvRiCJ5XP5HZYiYl7ocMHH+T/UEbQ==", + "dependencies": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^4.9.0", + "azure-pipelines-tool-lib": "^2.0.7", + "ini": "^1.3.8", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "mocha": "^8.4.0", + "q": "^1.5.0", + "semver": "^5.7.2", + "typed-rest-client": "1.8.4" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/@types/node": { + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", "engines": { - "node": ">= 6.0.0" + "node": ">=0.3.0" } }, - "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/https-proxy-agent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", "dependencies": { - "agent-base": "5", - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, - "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/typed-rest-client": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", - "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", "dependencies": { - "des.js": "^1.1.0", - "js-md4": "^0.3.2", - "qs": "^6.10.3", + "qs": "^6.9.1", "tunnel": "0.0.6", "underscore": "^1.12.1" - }, - "engines": { - "node": ">= 16.0.0" } }, "node_modules/azure-pipelines-tasks-utility-common": { @@ -222,9 +308,42 @@ } }, "node_modules/azure-pipelines-tasks-utility-common/node_modules/@types/node": { - "version": "16.18.105", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.105.tgz", - "integrity": "sha512-w2d0Z9yMk07uH3+Cx0N8lqFyi3yjXZxlbYappPj+AsOlT02OyxyiuNoNHdGt6EuiSm8Wtgp2YV7vWg+GMFrvFA==" + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/azure-pipelines-tool-lib": { "version": "2.0.7", @@ -240,11 +359,30 @@ "uuid": "^3.3.2" } }, + "node_modules/azure-pipelines-tool-lib/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -254,6 +392,22 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -277,6 +431,129 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -298,6 +575,22 @@ } } }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -314,13 +607,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" } }, "node_modules/ecdsa-sig-formatter": { @@ -331,6 +623,11 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -350,6 +647,25 @@ "node": ">= 0.4" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -362,6 +678,40 @@ "node": ">=4" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -381,11 +731,37 @@ } } }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -394,6 +770,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -432,6 +816,17 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/glob/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -454,6 +849,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -498,6 +914,14 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -525,6 +949,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -533,10 +962,34 @@ "node": ">= 0.10" } }, + "node_modules/ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "dependencies": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dependencies": { "hasown": "^2.0.2" }, @@ -547,23 +1000,78 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-md4": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", - "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -586,9 +1094,9 @@ } }, "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -615,6 +1123,25 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", @@ -650,6 +1177,25 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "node_modules/log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "dependencies": { + "inherits": "^2.0.4" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -669,11 +1215,6 @@ "node": ">= 0.6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, "node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -685,27 +1226,126 @@ "node": "*" } }, - "node_modules/ms": { + "node_modules/mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/msalv1": { + "node_modules/mocha/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/msal-node1": { "name": "@azure/msal-node", "version": "1.18.4", "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", - "deprecated": "A newer major version of this library is available. Please upgrade to the latest available version.", "dependencies": { "@azure/msal-common": "13.3.1", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" - }, + } + }, + "node_modules/msal-node1/node_modules/@azure/msal-common": { + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", + "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==", "engines": { - "node": "10 || 12 || 14 || 16 || 18" + "node": ">=0.8.0" } }, - "node_modules/msalv1/node_modules/uuid": { + "node_modules/msal-node1/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", @@ -713,29 +1353,18 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/msalv2": { + "node_modules/msal-node2": { "name": "@azure/msal-node", - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.10.0.tgz", - "integrity": "sha512-JxsSE0464a8IA/+q5EHKmchwNyUFJHtCH00tSXsLaOddwLjG6yVvTH6lGgPcWMhO7YWUXj/XVgVgeE9kZtsPUQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.0.tgz", + "integrity": "sha512-DhP97ycs7qlCVzzzWGzJiwAFyFj5okno74E4FUZ61oCLfKh4IxA1kxirqzrWuYZWpBe9HVPL6GA4NvmlEOBN5Q==", "dependencies": { - "@azure/msal-common": "14.13.0", + "@azure/msal-common": "14.14.1", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/msalv2/node_modules/@azure/msal-common": { - "version": "14.13.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.13.0.tgz", - "integrity": "sha512-b4M/tqRzJ4jGU91BiwCsLTqChveUEyFK3qY2wGfZ0zBswIBZjAxopx5CYt5wzZFKuN15HqRDYXQbztttuIC3nA==", - "engines": { - "node": ">=0.8.0" } }, - "node_modules/msalv2/node_modules/uuid": { + "node_modules/msal-node2/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", @@ -743,23 +1372,15 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" + "node_modules/nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, "node_modules/nodejs-file-downloader": { @@ -773,6 +1394,14 @@ "sanitize-filename": "^1.6.3" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -792,6 +1421,42 @@ "wrappy": "1" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -805,6 +1470,17 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -829,6 +1505,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -840,6 +1535,14 @@ "node": ">= 0.10" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -883,17 +1586,12 @@ "truncate-utf8-bytes": "^1.0.0" } }, - "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" - }, "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" } }, "node_modules/semver-compare": { @@ -901,6 +1599,14 @@ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -951,9 +1657,57 @@ } }, "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", @@ -966,10 +1720,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", @@ -979,11 +1739,6 @@ "utf8-byte-length": "^1.0.1" } }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -1025,6 +1780,14 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", @@ -1039,18 +1802,87 @@ "uuid": "bin/uuid" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/wrappy": { @@ -1058,24 +1890,102 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "node_modules/xml2js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", - "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=4.0.0" + "node": ">=10" } }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "engines": { - "node": ">=4.0" + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } } } diff --git a/Tasks/PowerShellV2/_buildConfigs/Node20/package.json b/Tasks/PowerShellV2/_buildConfigs/Node20/package.json index 8166aa387af5..bd1a0411816e 100644 --- a/Tasks/PowerShellV2/_buildConfigs/Node20/package.json +++ b/Tasks/PowerShellV2/_buildConfigs/Node20/package.json @@ -14,13 +14,16 @@ "author": "Microsoft Corporation", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", - "@types/q": "1.0.7", - "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", - "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", + "azure-pipelines-tasks-packaging-common": "^3.236.0", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { diff --git a/Tasks/PowerShellV2/package-lock.json b/Tasks/PowerShellV2/package-lock.json index fa268c75724c..6e0853b65dbf 100644 --- a/Tasks/PowerShellV2/package-lock.json +++ b/Tasks/PowerShellV2/package-lock.json @@ -9,10 +9,45 @@ "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==" }, - "@types/jsonwebtoken": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", - "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "@azure/msal-node": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.7.0.tgz", + "integrity": "sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw==", + "requires": { + "@azure/msal-common": "14.9.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.9.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.9.0.tgz", + "integrity": "sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "@types/fs-extra": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz", + "integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==", + "requires": { + "@types/node": "*" + } + }, + "@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", "requires": { "@types/node": "*" } @@ -23,14 +58,9 @@ "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" }, "@types/node": { - "version": "16.11.64", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.64.tgz", - "integrity": "sha512-z5hPTlVFzNwtJ2LNozTpJcD1Cu44c4LNuzaq1mwxmiHWQh2ULdR6Vjwo1UGldzRpzL0yUEdZddnfqGW2G70z6Q==" - }, - "@types/q": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", - "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" }, "@types/semver": { "version": "5.5.0", @@ -42,17 +72,41 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.13.tgz", "integrity": "sha512-pAeZeUbLE4Z9Vi9wsWV2bYPTweEHeJJy0G4pEjOA/FSvy1Ad5U5Km8iDV6TKre1mjBiVNfAdVHKruP8bAh4Q5A==" }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, "adm-zip": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.15.tgz", "integrity": "sha512-jYPWSeOA8EFoZnucrKCNihqBjoEGQSU4HKgHYQgKNEQ0pQF9a/DYuo/+fAxY76k4qe75LUlLWpAM1QWcBMTOKw==" }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "debug": "4" + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "argparse": { @@ -61,43 +115,19 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "~1.0.2" - } - }, - "async-mutex": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", - "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", - "requires": { - "tslib": "^2.4.0" - } - }, - "azure-devops-node-api": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", - "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", - "requires": { - "tunnel": "0.0.6", - "typed-rest-client": "^2.0.1" }, "dependencies": { - "typed-rest-client": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", - "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", - "requires": { - "des.js": "^1.1.0", - "js-md4": "^0.3.2", - "qs": "^6.10.3", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" } } }, "azure-pipelines-task-lib": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", - "integrity": "sha512-hjyDi5GI1cFmS2o6GzTFPqloeTZBeaTLOjPn/H3CVr0vV/MV+eYoWszVe9kn7XnRSiv22j3p4Rhw/Sy4v1okxA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.17.0.tgz", + "integrity": "sha512-WSopDnRAQAnxqKf7SEVHQS88NjCUNDQAc3qE6xqQWEwo8UeaK3UISxHXrVlaW0frjrgMhs3m+RhZPDlyIGYmhA==", "requires": { "adm-zip": "^0.5.10", "minimatch": "3.0.5", @@ -106,110 +136,136 @@ "semver": "^5.7.2", "shelljs": "^0.8.5", "uuid": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } } }, - "azure-pipelines-tasks-azure-arm-rest": { - "version": "3.242.2", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.242.2.tgz", - "integrity": "sha512-ljPHxC07BIMH9f3EP0+Rd86CCH+GX3TeDoULa1hCQUoMYrSfvx+Q5ywxoMp9riB78h9aUZf93CPuuVc79naUgg==", + "azure-pipelines-tasks-artifacts-common": { + "version": "2.230.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz", + "integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==", "requires": { - "@types/jsonwebtoken": "^8.5.8", - "@types/mocha": "^5.2.7", - "@types/node": "^10.17.0", - "@types/q": "1.5.4", - "async-mutex": "^0.4.0", - "azure-devops-node-api": "^14.0.1", - "azure-pipelines-task-lib": "^4.11.0", - "https-proxy-agent": "^4.0.0", - "jsonwebtoken": "^9.0.0", - "msalv1": "npm:@azure/msal-node@^1.18.4", - "msalv2": "npm:@azure/msal-node@^2.7.0", - "node-fetch": "^2.6.7", - "q": "1.5.1", - "typed-rest-client": "^2.0.1", - "xml2js": "0.6.2" + "@types/fs-extra": "8.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "azure-devops-node-api": "12.0.0", + "azure-pipelines-task-lib": "^4.2.0", + "fs-extra": "8.1.0", + "semver": "6.3.0" }, "dependencies": { - "@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" - }, - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", - "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" - }, - "agent-base": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", - "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" - }, - "https-proxy-agent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "azure-devops-node-api": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", + "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", "requires": { - "agent-base": "5", - "debug": "4" + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, - "msalv1": { - "version": "npm:@azure/msal-node@1.18.4", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", - "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "typed-rest-client": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "requires": { - "@azure/msal-common": "13.3.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" } + } + } + }, + "azure-pipelines-tasks-packaging-common": { + "version": "3.244.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-3.244.0.tgz", + "integrity": "sha512-Xa37kvWCkN1ElUiUJI1sFAZ3iDu4d5LzCB5l1ElWD9D1loKqIvSY+hM9oQvRiCJ5XP5HZYiYl7ocMHH+T/UEbQ==", + "requires": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^4.9.0", + "azure-pipelines-tool-lib": "^2.0.7", + "ini": "^1.3.8", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "mocha": "^8.4.0", + "q": "^1.5.0", + "semver": "^5.7.2", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" }, - "msalv2": { - "version": "npm:@azure/msal-node@2.14.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", - "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", "requires": { - "@azure/msal-common": "14.15.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.15.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", - "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" - } + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, "typed-rest-client": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", - "integrity": "sha512-rmAQM2gZw/PQpK5+5aSs+I6ZBv4PFC2BT1o+0ADS1SgSejA+14EmbI2Lt8uXwkX7oeOMkwFmg0pHKwe8D9IT5A==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", "requires": { - "des.js": "^1.1.0", - "js-md4": "^0.3.2", - "qs": "^6.10.3", + "qs": "^6.9.1", "tunnel": "0.0.6", "underscore": "^1.12.1" } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" } } }, "azure-pipelines-tasks-utility-common": { - "version": "3.235.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.235.0.tgz", - "integrity": "sha512-1jxzFUYq9BBnzSGt9bnVf1qxUBC+9XEZE5LOJGWEGuzsWk0nVzM2q4pWzsWKzHz2otxzcjBQN/QGxwhVVKlO4Q==", + "version": "3.242.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.242.0.tgz", + "integrity": "sha512-PCpJj2f+v1SxjP+NYtSeTQdgPE1WuadzeKcjaqzXSuHGf4KbDcVSQVD2IEo3dAGrvVfLZLnk4B2x/rwbWzminQ==", "requires": { "@types/node": "^16.11.39", - "azure-pipelines-task-lib": "^4.4.0", + "azure-pipelines-task-lib": "^4.11.0", "azure-pipelines-tool-lib": "^2.0.7", "js-yaml": "3.13.1", "semver": "^5.7.2" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } } }, "azure-pipelines-tool-lib": { @@ -224,6 +280,28 @@ "semver-compare": "^1.0.0", "typed-rest-client": "^1.8.6", "uuid": "^3.3.2" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "typed-rest-client": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } } }, "balanced-match": { @@ -231,6 +309,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -240,6 +323,19 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "requires": { + "fill-range": "^7.1.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -257,6 +353,98 @@ "set-function-length": "^1.2.1" } }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -270,6 +458,11 @@ "ms": "2.1.2" } }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, "define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -280,14 +473,10 @@ "gopd": "^1.0.1" } }, - "des.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", - "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" }, "ecdsa-sig-formatter": { "version": "1.0.11", @@ -297,6 +486,11 @@ "safe-buffer": "^5.0.1" } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -310,26 +504,79 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" + }, "follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -343,26 +590,24 @@ } }, "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - } + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" } }, "gopd": { @@ -373,6 +618,21 @@ "get-intrinsic": "^1.1.3" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -397,23 +657,12 @@ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "requires": { "function-bind": "^1.1.2" - }, - "dependencies": { - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" - } } }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "requires": { - "agent-base": "6", - "debug": "4" - } + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "inflight": { "version": "1.0.6", @@ -429,23 +678,74 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "requires": { "hasown": "^2.0.2" } }, - "js-md4": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", - "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==" + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "js-yaml": { "version": "3.13.1", @@ -456,6 +756,19 @@ "esprima": "^4.0.0" } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -499,6 +812,19 @@ "safe-buffer": "^5.0.1" } }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, "lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", @@ -534,6 +860,22 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "requires": { + "chalk": "^4.0.0" + } + }, + "ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "requires": { + "inherits": "^2.0.4" + } + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -547,11 +889,6 @@ "mime-db": "1.52.0" } }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" - }, "minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -560,19 +897,130 @@ "brace-expansion": "^1.1.7" } }, + "mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "requires": { + "argparse": "^2.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "msal-node1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", "requires": { - "whatwg-url": "^5.0.0" + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } } }, + "msal-node2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + }, "nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", @@ -582,12 +1030,36 @@ "https-proxy-agent": "^5.0.0", "mime-types": "^2.1.27", "sanitize-filename": "^1.6.3" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + } } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" }, "once": { "version": "1.4.0", @@ -597,6 +1069,27 @@ "wrappy": "1" } }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -607,19 +1100,40 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" }, "qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "requires": { "side-channel": "^1.0.6" } }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "requires": { + "picomatch": "^2.2.1" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -628,6 +1142,11 @@ "resolve": "^1.1.6" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, "resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -651,21 +1170,24 @@ "truncate-utf8-bytes": "^1.0.0" } }, - "sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" - }, "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "requires": { + "randombytes": "^2.1.0" + } + }, "set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -701,19 +1223,52 @@ } }, "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } }, "truncate-utf8-bytes": { "version": "1.0.2", @@ -723,36 +1278,26 @@ "utf8-byte-length": "^1.0.1" } }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, - "typed-rest-client": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", - "requires": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, "typescript": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", - "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "utf8-byte-length": { "version": "1.0.5", @@ -764,18 +1309,65 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "string-width": "^1.0.2 || 2" + } + }, + "workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } } }, "wrappy": { @@ -783,19 +1375,75 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "xml2js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", - "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" } }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } } diff --git a/Tasks/PowerShellV2/package.json b/Tasks/PowerShellV2/package.json index 4264ced9d267..11f052311330 100644 --- a/Tasks/PowerShellV2/package.json +++ b/Tasks/PowerShellV2/package.json @@ -14,16 +14,19 @@ "author": "Microsoft Corporation", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^16.11.39", - "@types/q": "1.0.7", - "agent-base": "6.0.2", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", - "azure-pipelines-tasks-azure-arm-rest": "^3.242.2", + "azure-pipelines-tasks-packaging-common": "^3.236.0", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.9.5" } } diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 3320833d6538..22439ef80fa9 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -6,10 +6,10 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { execSync } from 'child_process'; -import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint'; +import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); + function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -20,32 +20,77 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -function setUpConnectedServiceEnvironmentVariables() { - var connectedService = tl.getInput('ConnectedServiceName'); - if(connectedService) { - var authScheme: string = tl.getEndpointAuthorizationScheme(connectedService, false); - if (authScheme && authScheme.toLowerCase() == "workloadidentityfederation") { - process.env.AZURESUBSCRIPTION_SERVICE_CONNECTION_ID = connectedService; - process.env.AZURESUBSCRIPTION_CLIENT_ID = tl.getEndpointAuthorizationParameter(connectedService, "serviceprincipalid", false); - process.env.AZURESUBSCRIPTION_TENANT_ID = tl.getEndpointAuthorizationParameter(connectedService, "tenantid", false); - process.env.VSTS_ACCESS_TOKEN = tl.getEndpointAuthorizationParameter('SystemVssConnection', 'AccessToken', false); - tl.debug('Environment variables AZURESUBSCRIPTION_SERVICE_CONNECTION_ID,AZURESUBSCRIPTION_CLIENT_ID and AZURESUBSCRIPTION_TENANT_ID are set'); - } - else { - tl.debug('Connected service is not of type Workload Identity Federation'); - } - } - else { - tl.debug('No connected service set'); +async function startNamedPiped(pipeName: string, connectedService: string) { + const content = ` + # Create a security descriptor to allow Everyone to access the pipe + $pipePath = "/tmp/$pipeName" + + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + + # Set permissions using chmod + # bash -c "chmod 777 $pipePath" + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Host "Client connected." + + # Send a message to the client + $message = "Hello from the server!" + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($message) + $writer.Flush() + + # Close the pipe + $writer.Close() + $pipe.Close() + `; + + // Spawn the PowerShell process + let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); + + powershell.arg('-ExecutionPolicy') + .arg('Bypass') + .arg('-Command') + .arg(content); + + let options = { + failOnStdErr: false, + errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out + outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. + ignoreReturnCode: true + }; + + // Execute the PowerShell command and capture the output + const result = await powershell.exec(options); + + // Check the result and set the task result + if (result === 0) { + tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); + } else { + tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); } + + // Handle PowerShell exit + powershell.on('close', (code) => { + console.log(`PowerShell process exited with code ${code}`); + }); + + return powershell; } - async function run() { + let server; try { // Get inputs. - setUpConnectedServiceEnvironmentVariables(); + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + let pipe_name : string = "praval"; + server = startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); let input_informationPreference: string = getActionPreference('informationPreference', 'Default'); @@ -60,6 +105,7 @@ async function run() { let input_arguments: string; let input_script: string; let input_targetType: string = tl.getInput('targetType') || ''; + if (input_targetType.toUpperCase() == 'FILEPATH') { input_filePath = tl.getPathInput('filePath', /*required*/ true); if (!tl.stats(input_filePath).isFile() || !input_filePath.toUpperCase().match(/\.PS1$/)) { @@ -121,6 +167,40 @@ async function run() { } else { script = `${input_script}`; } + + if (connectedServiceName && connectedServiceName.trim().length > 0) { + script = ` + function Get-Token { + + $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + try { + $pipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + $writer = New-Object System.IO.StreamWriter($pipe) + $reader = New-Object System.IO.StreamReader($pipe) + + # Send a message to the server + $message = "Hello from PowerShell!" + $writer.WriteLine($message) + $writer.Flush() + + # Read the response + $response = $reader.ReadLine() + Write-Host "Received from server: $response" + } + catch { + Write-Host "Error: $_" + } + finally { + $pipe.Dispose() + } + } + + ${script} + `; + } + if (input_showWarnings) { script = ` $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -135,6 +215,9 @@ async function run() { Invoke-Command {${script}} -WarningVariable +warnings; `; } + + tl.debug(script); + contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); @@ -212,6 +295,9 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } + finally { + server.kill(); + } } run(); diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 0eebd509b7f1..c2575eb03fea 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 246, - "Patch": 20 + "Minor": 247, + "Patch": 10 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 6b0b38306d9f..8d457b089c69 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 246, - "Patch": 20 + "Minor": 247, + "Patch": 10 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/tsconfig.json b/Tasks/PowerShellV2/tsconfig.json index 0438b79f69ac..a347ba35a9ac 100644 --- a/Tasks/PowerShellV2/tsconfig.json +++ b/Tasks/PowerShellV2/tsconfig.json @@ -1,6 +1,12 @@ { "compilerOptions": { - "target": "ES6", - "module": "commonjs" - } + "module": "commonjs", + "target": "es6", + "sourceMap":true, + "skipLibCheck": true, + "esModuleInterop": true + }, + "exclude": [ + "node_modules" + ] } \ No newline at end of file diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 2f9034f45bed..fdb971f0e011 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.245.0 -Node20-225|2.245.1 +Default|2.247.10 +Node20-225|2.247.11 diff --git a/_generated/PowerShellV2/Auth.ts b/_generated/PowerShellV2/Auth.ts new file mode 100644 index 000000000000..810a37507a91 --- /dev/null +++ b/_generated/PowerShellV2/Auth.ts @@ -0,0 +1,85 @@ +import * as tl from "azure-pipelines-task-lib/task"; +import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; + +const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); +if(nodeVersion < 16) { + tl.error(tl.loc('NodeVersionSupport', nodeVersion)); +} + +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; + +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string +): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} \ No newline at end of file diff --git a/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson b/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson index f4b03fe1b455..53f60e992ef3 100644 --- a/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson @@ -6,6 +6,8 @@ "loc.releaseNotes": "Script task consistency. Added support for macOS and Linux.", "loc.group.displayName.preferenceVariables": "Preference Variables", "loc.group.displayName.advanced": "Advanced", + "loc.input.label.ConnectedServiceName": "Azure Resource Manager connection", + "loc.input.help.ConnectedServiceName": "Select an Azure Resource Manager service connection", "loc.input.label.targetType": "Type", "loc.input.help.targetType": "Target script type: File Path or Inline", "loc.input.label.filePath": "Script Path", diff --git a/_generated/PowerShellV2/package-lock.json b/_generated/PowerShellV2/package-lock.json index e05991c5de66..6e0853b65dbf 100644 --- a/_generated/PowerShellV2/package-lock.json +++ b/_generated/PowerShellV2/package-lock.json @@ -4,15 +4,63 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/msal-common": { + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", + "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==" + }, + "@azure/msal-node": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.7.0.tgz", + "integrity": "sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw==", + "requires": { + "@azure/msal-common": "14.9.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.9.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.9.0.tgz", + "integrity": "sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "@types/fs-extra": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz", + "integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==", + "requires": { + "@types/node": "*" + } + }, + "@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", + "requires": { + "@types/node": "*" + } + }, "@types/mocha": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" }, "@types/node": { - "version": "16.11.64", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.64.tgz", - "integrity": "sha512-z5hPTlVFzNwtJ2LNozTpJcD1Cu44c4LNuzaq1mwxmiHWQh2ULdR6Vjwo1UGldzRpzL0yUEdZddnfqGW2G70z6Q==" + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" }, "@types/semver": { "version": "5.5.0", @@ -24,17 +72,41 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.13.tgz", "integrity": "sha512-pAeZeUbLE4Z9Vi9wsWV2bYPTweEHeJJy0G4pEjOA/FSvy1Ad5U5Km8iDV6TKre1mjBiVNfAdVHKruP8bAh4Q5A==" }, + "@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, "adm-zip": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.15.tgz", "integrity": "sha512-jYPWSeOA8EFoZnucrKCNihqBjoEGQSU4HKgHYQgKNEQ0pQF9a/DYuo/+fAxY76k4qe75LUlLWpAM1QWcBMTOKw==" }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + }, + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "debug": "4" + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "argparse": { @@ -43,12 +115,19 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + } } }, "azure-pipelines-task-lib": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", - "integrity": "sha512-hjyDi5GI1cFmS2o6GzTFPqloeTZBeaTLOjPn/H3CVr0vV/MV+eYoWszVe9kn7XnRSiv22j3p4Rhw/Sy4v1okxA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.17.0.tgz", + "integrity": "sha512-WSopDnRAQAnxqKf7SEVHQS88NjCUNDQAc3qE6xqQWEwo8UeaK3UISxHXrVlaW0frjrgMhs3m+RhZPDlyIGYmhA==", "requires": { "adm-zip": "^0.5.10", "minimatch": "3.0.5", @@ -57,18 +136,136 @@ "semver": "^5.7.2", "shelljs": "^0.8.5", "uuid": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "azure-pipelines-tasks-artifacts-common": { + "version": "2.230.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz", + "integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==", + "requires": { + "@types/fs-extra": "8.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "azure-devops-node-api": "12.0.0", + "azure-pipelines-task-lib": "^4.2.0", + "fs-extra": "8.1.0", + "semver": "6.3.0" + }, + "dependencies": { + "azure-devops-node-api": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", + "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "typed-rest-client": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } + } + }, + "azure-pipelines-tasks-packaging-common": { + "version": "3.244.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-3.244.0.tgz", + "integrity": "sha512-Xa37kvWCkN1ElUiUJI1sFAZ3iDu4d5LzCB5l1ElWD9D1loKqIvSY+hM9oQvRiCJ5XP5HZYiYl7ocMHH+T/UEbQ==", + "requires": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^4.9.0", + "azure-pipelines-tool-lib": "^2.0.7", + "ini": "^1.3.8", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "mocha": "^8.4.0", + "q": "^1.5.0", + "semver": "^5.7.2", + "typed-rest-client": "1.8.4" + }, + "dependencies": { + "@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==" + }, + "azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + } } }, "azure-pipelines-tasks-utility-common": { - "version": "3.235.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.235.0.tgz", - "integrity": "sha512-1jxzFUYq9BBnzSGt9bnVf1qxUBC+9XEZE5LOJGWEGuzsWk0nVzM2q4pWzsWKzHz2otxzcjBQN/QGxwhVVKlO4Q==", + "version": "3.242.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.242.0.tgz", + "integrity": "sha512-PCpJj2f+v1SxjP+NYtSeTQdgPE1WuadzeKcjaqzXSuHGf4KbDcVSQVD2IEo3dAGrvVfLZLnk4B2x/rwbWzminQ==", "requires": { "@types/node": "^16.11.39", - "azure-pipelines-task-lib": "^4.4.0", + "azure-pipelines-task-lib": "^4.11.0", "azure-pipelines-tool-lib": "^2.0.7", "js-yaml": "3.13.1", "semver": "^5.7.2" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } } }, "azure-pipelines-tool-lib": { @@ -83,6 +280,28 @@ "semver-compare": "^1.0.0", "typed-rest-client": "^1.8.6", "uuid": "^3.3.2" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + }, + "typed-rest-client": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", + "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } } }, "balanced-match": { @@ -90,6 +309,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -99,6 +323,24 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "requires": { + "fill-range": "^7.1.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -111,6 +353,98 @@ "set-function-length": "^1.2.1" } }, + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.3.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -124,6 +458,11 @@ "ms": "2.1.2" } }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + }, "define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -134,6 +473,24 @@ "gopd": "^1.0.1" } }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -147,26 +504,79 @@ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" + }, "follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "optional": true + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -180,26 +590,24 @@ } }, "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - } + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" } }, "gopd": { @@ -210,6 +618,21 @@ "get-intrinsic": "^1.1.3" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -234,23 +657,12 @@ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "requires": { "function-bind": "^1.1.2" - }, - "dependencies": { - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" - } } }, - "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "requires": { - "agent-base": "6", - "debug": "4" - } + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "inflight": { "version": "1.0.6", @@ -266,19 +678,75 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "requires": { "hasown": "^2.0.2" } }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -288,6 +756,126 @@ "esprima": "^4.0.0" } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "dependencies": { + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" + } + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "requires": { + "chalk": "^4.0.0" + } + }, + "ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "requires": { + "inherits": "^2.0.4" + } + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -309,11 +897,130 @@ "brace-expansion": "^1.1.7" } }, + "mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "requires": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "requires": { + "argparse": "^2.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "msal-node1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "msal-node2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + }, "nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", @@ -323,12 +1030,36 @@ "https-proxy-agent": "^5.0.0", "mime-types": "^2.1.27", "sanitize-filename": "^1.6.3" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "requires": { + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + } } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, "object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==" + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==" }, "once": { "version": "1.4.0", @@ -338,6 +1069,27 @@ "wrappy": "1" } }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -348,19 +1100,40 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" }, "qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "requires": { "side-channel": "^1.0.6" } }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "requires": { + "picomatch": "^2.2.1" + } + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -369,6 +1142,11 @@ "resolve": "^1.1.6" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, "resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -379,6 +1157,11 @@ "supports-preserve-symlinks-flag": "^1.0.0" } }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, "sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", @@ -388,15 +1171,23 @@ } }, "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "requires": { + "randombytes": "^2.1.0" + } + }, "set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -432,15 +1223,53 @@ } }, "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, "truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -454,26 +1283,21 @@ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, - "typed-rest-client": { - "version": "1.8.11", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", - "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", - "requires": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, "typescript": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", - "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "utf8-byte-length": { "version": "1.0.5", @@ -485,10 +1309,141 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } } diff --git a/_generated/PowerShellV2/package.json b/_generated/PowerShellV2/package.json index ea59607adf8e..11f052311330 100644 --- a/_generated/PowerShellV2/package.json +++ b/_generated/PowerShellV2/package.json @@ -14,13 +14,19 @@ "author": "Microsoft Corporation", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^16.11.39", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "azure-pipelines-tasks-packaging-common": "^3.236.0", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.9.5" } } diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index 2f5f3069ca20..d820bfee77e0 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -6,9 +6,10 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { execSync } from 'child_process'; +import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); + function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -19,39 +20,84 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -// Function to execute PowerShell commands -function runPowerShellScript(scriptPath: string): void { - const fullScriptPath = path.join(__dirname, scriptPath); +async function startNamedPiped(pipeName: string, connectedService: string) { + // Path to your PowerShell script + const content = ` +# Create a security descriptor to allow Everyone to access the pipe +$pipePath = "/tmp/$pipeName" + +# Create a named pipe with the specified security +$pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + +# Set permissions using chmod +bash -c "chmod 777 $pipePath" + +Write-Host "Waiting for a connection..." +$pipe.WaitForConnection() + +Write-Host "Client connected." + +# Send a message to the client +$message = "Hello from the server!" +$writer = New-Object System.IO.StreamWriter($pipe) +$writer.WriteLine($message) +$writer.Flush() + +# Close the pipe +$writer.Close() +$pipe.Close() + `; - try { - // Execute the PowerShell script, making cmdlets available to the pipeline - const output = execSync(`powershell -Command "Import-Module $PSScriptRoot\\ps_modules\\VstsAzureHelpers_"`); - console.log(output.toString()); - } catch (error) { - console.error(`Error running PowerShell script: ${error.message}`); - } -} + // Spawn the PowerShell process + let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); -// Main function to run when the task is executed -function runTask() { - // Inject the custom cmdlet by running the script that defines it - runPowerShellScript('powershell.ps1'); + powershell.arg('-ExecutionPolicy') + .arg('Bypass') + .arg('-Command') + .arg(content); - console.log("PowerShell cmdlet injected successfully."); + let options = { + failOnStdErr: false, + errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out + outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. + ignoreReturnCode: true + }; + + // Execute the PowerShell command and capture the output + const result = await powershell.exec(options); + + // Check the result and set the task result + if (result === 0) { + tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); + } else { + tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); + } + + // Handle PowerShell exit + powershell.on('close', (code) => { + console.log(`PowerShell process exited with code ${code}`); + }); + + return powershell; } async function run() { + let server; try { - tl.setResourcePath(path.join(__dirname, 'task.json')); - // runTask() // Get inputs. + + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + let pipe_name : string = "praval"; + server = startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); let input_informationPreference: string = getActionPreference('informationPreference', 'Default'); let input_verbosePreference: string = getActionPreference('verbosePreference', 'Default'); let input_debugPreference: string = getActionPreference('debugPreference', 'Default'); let input_progressPreference: string = getActionPreference('progressPreference', 'SilentlyContinue'); - let input_showWarnings = tl.getBoolInput('showWarnings', false); let input_failOnStderr = tl.getBoolInput('failOnStderr', false); let input_ignoreLASTEXITCODE = tl.getBoolInput('ignoreLASTEXITCODE', false); @@ -60,6 +106,7 @@ async function run() { let input_arguments: string; let input_script: string; let input_targetType: string = tl.getInput('targetType') || ''; + if (input_targetType.toUpperCase() == 'FILEPATH') { input_filePath = tl.getPathInput('filePath', /*required*/ true); if (!tl.stats(input_filePath).isFile() || !input_filePath.toUpperCase().match(/\.PS1$/)) { @@ -98,12 +145,6 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } - const directory1: string = process.cwd(); - const directory2: string = path.resolve(); - - console.log(directory1); - console.log(directory2); - let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { @@ -127,6 +168,40 @@ async function run() { } else { script = `${input_script}`; } + + if (connectedServiceName && connectedServiceName.trim().length > 0) { + script = ` + function Get-Token { + + $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + try { + $pipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + $writer = New-Object System.IO.StreamWriter($pipe) + $reader = New-Object System.IO.StreamReader($pipe) + + # Send a message to the server + $message = "Hello from PowerShell!" + $writer.WriteLine($message) + $writer.Flush() + + # Read the response + $response = $reader.ReadLine() + Write-Host "Received from server: $response" + } + catch { + Write-Host "Error: $_" + } + finally { + $pipe.Dispose() + } + } + + ${script} + `; + } + if (input_showWarnings) { script = ` $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -141,6 +216,9 @@ async function run() { Invoke-Command {${script}} -WarningVariable +warnings; `; } + + tl.debug(script); + contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); @@ -218,6 +296,9 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } + finally { + server.kill(); + } } run(); diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index e0ae9b216402..35b108d060cc 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 0 + "Minor": 247, + "Patch": 10 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Resource Manager connection", + "defaultValue": "", + "helpMarkDown": "Select an Azure Resource Manager service connection" + }, { "name": "targetType", "type": "radio", @@ -259,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.245.0", - "Node20-225": "2.245.1" + "Default": "2.247.10", + "Node20-225": "2.247.11" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index bc5289e318a7..22165d05a432 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 0 + "Minor": 247, + "Patch": 10 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "ms-resource:loc.input.label.ConnectedServiceName", + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceName" + }, { "name": "targetType", "type": "radio", @@ -259,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.245.0", - "Node20-225": "2.245.1" + "Default": "2.247.10", + "Node20-225": "2.247.11" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/tsconfig.json b/_generated/PowerShellV2/tsconfig.json index 0438b79f69ac..a347ba35a9ac 100644 --- a/_generated/PowerShellV2/tsconfig.json +++ b/_generated/PowerShellV2/tsconfig.json @@ -1,6 +1,12 @@ { "compilerOptions": { - "target": "ES6", - "module": "commonjs" - } + "module": "commonjs", + "target": "es6", + "sourceMap":true, + "skipLibCheck": true, + "esModuleInterop": true + }, + "exclude": [ + "node_modules" + ] } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/Auth.ts b/_generated/PowerShellV2_Node20/Auth.ts new file mode 100644 index 000000000000..810a37507a91 --- /dev/null +++ b/_generated/PowerShellV2_Node20/Auth.ts @@ -0,0 +1,85 @@ +import * as tl from "azure-pipelines-task-lib/task"; +import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; + +const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); +if(nodeVersion < 16) { + tl.error(tl.loc('NodeVersionSupport', nodeVersion)); +} + +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; + +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string +): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson b/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson index f4b03fe1b455..53f60e992ef3 100644 --- a/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson @@ -6,6 +6,8 @@ "loc.releaseNotes": "Script task consistency. Added support for macOS and Linux.", "loc.group.displayName.preferenceVariables": "Preference Variables", "loc.group.displayName.advanced": "Advanced", + "loc.input.label.ConnectedServiceName": "Azure Resource Manager connection", + "loc.input.help.ConnectedServiceName": "Select an Azure Resource Manager service connection", "loc.input.label.targetType": "Type", "loc.input.help.targetType": "Target script type: File Path or Inline", "loc.input.label.filePath": "Script Path", diff --git a/_generated/PowerShellV2_Node20/make.json b/_generated/PowerShellV2_Node20/make.json index 877303e646fe..4e8270620a89 100644 --- a/_generated/PowerShellV2_Node20/make.json +++ b/_generated/PowerShellV2_Node20/make.json @@ -19,7 +19,9 @@ { "items": [ "node_modules/azure-pipelines-tasks-utility-common/node_modules/azure-pipelines-task-lib", - "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib" + "node_modules/azure-pipelines-tool-lib/node_modules/azure-pipelines-task-lib", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/agent-base", + "node_modules/azure-pipelines-tasks-azure-arm-rest/node_modules/azure-pipelines-task-lib" ], "options": "-Rf" } @@ -32,6 +34,14 @@ { "module": "../Common/VstsAzureHelpers_", "type": "ps" + }, + { + "module": "../Common/VstsAzureRestHelpers_", + "type": "ps" + }, + { + "module": "../Common/TlsHelper_", + "type": "ps" } ] } diff --git a/_generated/PowerShellV2_Node20/package-lock.json b/_generated/PowerShellV2_Node20/package-lock.json index 9ef07eaad521..9c6a8f84d4c9 100644 --- a/_generated/PowerShellV2_Node20/package-lock.json +++ b/_generated/PowerShellV2_Node20/package-lock.json @@ -9,16 +9,72 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", "azure-pipelines-task-lib": "^4.16.0", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "azure-pipelines-tasks-packaging-common": "^3.236.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { "typescript": "5.1.6" } }, + "node_modules/@azure/msal-common": { + "version": "14.14.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.1.tgz", + "integrity": "sha512-2Q3tqNz/PZLfSr8BvcHZVpRRfSn4MjGSqjj9J+HlBsmbf1Uu4P0WeXnemjTJwwx9KrmplsrN3UkZ/LPOR720rw==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@azure/msal-node": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.0.tgz", + "integrity": "sha512-DhP97ycs7qlCVzzzWGzJiwAFyFj5okno74E4FUZ61oCLfKh4IxA1kxirqzrWuYZWpBe9HVPL6GA4NvmlEOBN5Q==", + "dependencies": { + "@azure/msal-common": "14.14.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@azure/msal-node/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@types/fs-extra": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz", + "integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ini": { + "version": "1.3.30", + "resolved": "https://registry.npmjs.org/@types/ini/-/ini-1.3.30.tgz", + "integrity": "sha512-2+iF8zPSbpU83UKE+PNd4r/MhwNAdyGpk3H+VMgEH3EhjFZq1kouLgRoZrmIcmoGX97xFvqdS44DkICR5Nz3tQ==" + }, + "node_modules/@types/ltx": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@types/ltx/-/ltx-2.8.0.tgz", + "integrity": "sha512-qHnPVD0FFquypl7Yy8qqvDjhnX3c7toUYjjALK+bug7MfR2WCRTIjw+GUMfehRi/Mbhj5rLAQerPTnTCUzSCWg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/mocha": { "version": "5.2.7", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", @@ -42,6 +98,11 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.13.tgz", "integrity": "sha512-pAeZeUbLE4Z9Vi9wsWV2bYPTweEHeJJy0G4pEjOA/FSvy1Ad5U5Km8iDV6TKre1mjBiVNfAdVHKruP8bAh4Q5A==" }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", + "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==" + }, "node_modules/adm-zip": { "version": "0.5.15", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.15.tgz", @@ -61,18 +122,66 @@ "node": ">= 6.0.0" } }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/azure-devops-node-api": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz", + "integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==", "dependencies": { - "sprintf-js": "~1.0.2" + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" } }, "node_modules/azure-pipelines-task-lib": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.16.0.tgz", - "integrity": "sha512-hjyDi5GI1cFmS2o6GzTFPqloeTZBeaTLOjPn/H3CVr0vV/MV+eYoWszVe9kn7XnRSiv22j3p4Rhw/Sy4v1okxA==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.17.0.tgz", + "integrity": "sha512-WSopDnRAQAnxqKf7SEVHQS88NjCUNDQAc3qE6xqQWEwo8UeaK3UISxHXrVlaW0frjrgMhs3m+RhZPDlyIGYmhA==", "dependencies": { "adm-zip": "^0.5.10", "minimatch": "3.0.5", @@ -83,6 +192,109 @@ "uuid": "^3.0.1" } }, + "node_modules/azure-pipelines-task-lib/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-artifacts-common": { + "version": "2.230.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz", + "integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==", + "dependencies": { + "@types/fs-extra": "8.0.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "azure-devops-node-api": "12.0.0", + "azure-pipelines-task-lib": "^4.2.0", + "fs-extra": "8.1.0", + "semver": "6.3.0" + } + }, + "node_modules/azure-pipelines-tasks-artifacts-common/node_modules/@types/node": { + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" + }, + "node_modules/azure-pipelines-tasks-artifacts-common/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common": { + "version": "3.244.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-packaging-common/-/azure-pipelines-tasks-packaging-common-3.244.0.tgz", + "integrity": "sha512-Xa37kvWCkN1ElUiUJI1sFAZ3iDu4d5LzCB5l1ElWD9D1loKqIvSY+hM9oQvRiCJ5XP5HZYiYl7ocMHH+T/UEbQ==", + "dependencies": { + "@types/ini": "1.3.30", + "@types/ltx": "2.8.0", + "@types/mocha": "^5.2.6", + "@types/node": "^16.11.39", + "@types/q": "1.5.2", + "adm-zip": "^0.4.11", + "azure-devops-node-api": "10.2.2", + "azure-pipelines-task-lib": "^4.9.0", + "azure-pipelines-tool-lib": "^2.0.7", + "ini": "^1.3.8", + "ip-address": "^5.8.9", + "ltx": "^2.6.2", + "mocha": "^8.4.0", + "q": "^1.5.0", + "semver": "^5.7.2", + "typed-rest-client": "1.8.4" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/@types/node": { + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/@types/q": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", + "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==" + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/azure-devops-node-api": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.2.2.tgz", + "integrity": "sha512-4TVv2X7oNStT0vLaEfExmy3J4/CzfuXolEcQl/BRUmvGySqKStTG2O55/hUQ0kM7UJlZBLgniM0SBq4d/WkKow==", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-packaging-common/node_modules/typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "dependencies": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, "node_modules/azure-pipelines-tasks-utility-common": { "version": "3.242.0", "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-utility-common/-/azure-pipelines-tasks-utility-common-3.242.0.tgz", @@ -96,9 +308,42 @@ } }, "node_modules/azure-pipelines-tasks-utility-common/node_modules/@types/node": { - "version": "16.18.105", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.105.tgz", - "integrity": "sha512-w2d0Z9yMk07uH3+Cx0N8lqFyi3yjXZxlbYappPj+AsOlT02OyxyiuNoNHdGt6EuiSm8Wtgp2YV7vWg+GMFrvFA==" + "version": "16.18.106", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.106.tgz", + "integrity": "sha512-YTgQUcpdXRc7iiEMutkkXl9WUx5lGUCVYvnfRg9CV+IA4l9epctEhCTbaw4KgzXaKYv8emvFJkEM65+MkNUhsQ==" + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/azure-pipelines-tasks-utility-common/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, "node_modules/azure-pipelines-tool-lib": { "version": "2.0.7", @@ -114,11 +359,30 @@ "uuid": "^3.3.2" } }, + "node_modules/azure-pipelines-tool-lib/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -128,6 +392,27 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -146,6 +431,129 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -167,6 +575,22 @@ } } }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -183,6 +607,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -202,6 +647,25 @@ "node": ">= 0.4" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -214,6 +678,40 @@ "node": ">=4" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -233,11 +731,37 @@ } } }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -246,6 +770,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -284,6 +816,17 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/glob/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -306,6 +849,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "engines": { + "node": ">=4.x" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -350,6 +914,14 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", @@ -377,6 +949,11 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -385,10 +962,34 @@ "node": ">= 0.10" } }, - "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "node_modules/ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "dependencies": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dependencies": { "hasown": "^2.0.2" }, @@ -399,18 +1000,202 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, "node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dependencies": { + "chalk": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ltx": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/ltx/-/ltx-2.10.0.tgz", + "integrity": "sha512-RB4zR6Mrp/0wTNS9WxMvpgfht/7u/8QAC9DpPD19opL/4OASPa28uoliFqeDkLUU8pQ4aeAfATBZmz1aSAHkMw==", + "dependencies": { + "inherits": "^2.0.4" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -441,11 +1226,163 @@ "node": "*" } }, - "node_modules/ms": { + "node_modules/mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "dependencies": { + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/mocha/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/msal-node1": { + "name": "@azure/msal-node", + "version": "1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "dependencies": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "node_modules/msal-node1/node_modules/@azure/msal-common": { + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz", + "integrity": "sha512-Lrk1ozoAtaP/cp53May3v6HtcFSVxdFrg2Pa/1xu5oIvsIwhxW6zSPibKefCOVgd5osgykMi5jjcZHv8XkzZEQ==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/msal-node1/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/msal-node2": { + "name": "@azure/msal-node", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.0.tgz", + "integrity": "sha512-DhP97ycs7qlCVzzzWGzJiwAFyFj5okno74E4FUZ61oCLfKh4IxA1kxirqzrWuYZWpBe9HVPL6GA4NvmlEOBN5Q==", + "dependencies": { + "@azure/msal-common": "14.14.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + } + }, + "node_modules/msal-node2/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", @@ -457,6 +1394,14 @@ "sanitize-filename": "^1.6.3" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -476,6 +1421,42 @@ "wrappy": "1" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -489,6 +1470,17 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -513,6 +1505,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -524,6 +1535,14 @@ "node": ">= 0.10" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -540,6 +1559,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", @@ -549,11 +1587,11 @@ } }, "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" } }, "node_modules/semver-compare": { @@ -561,6 +1599,14 @@ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, + "node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -611,9 +1657,57 @@ } }, "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", @@ -626,6 +1720,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -675,6 +1780,14 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", @@ -689,10 +1802,191 @@ "uuid": "bin/uuid" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/_generated/PowerShellV2_Node20/package.json b/_generated/PowerShellV2_Node20/package.json index fbbd8d7a29f7..bd1a0411816e 100644 --- a/_generated/PowerShellV2_Node20/package.json +++ b/_generated/PowerShellV2_Node20/package.json @@ -14,10 +14,16 @@ "author": "Microsoft Corporation", "license": "MIT", "dependencies": { + "@azure/msal-node": "^2.7.0", "@types/mocha": "^5.2.7", "@types/node": "^20.3.1", "azure-pipelines-task-lib": "^4.16.0", "azure-pipelines-tasks-utility-common": "^3.235.0", + "azure-pipelines-tasks-packaging-common": "^3.236.0", + "azure-pipelines-tasks-artifacts-common": "2.230.0", + "msal-node1": "npm:@azure/msal-node@^1.18.4", + "msal-node2": "npm:@azure/msal-node@^2.9.2", + "semver": "^6.3.1", "uuid": "^3.0.1" }, "devDependencies": { diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index 2f5f3069ca20..d820bfee77e0 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -6,9 +6,10 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { execSync } from 'child_process'; +import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); + function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -19,39 +20,84 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -// Function to execute PowerShell commands -function runPowerShellScript(scriptPath: string): void { - const fullScriptPath = path.join(__dirname, scriptPath); +async function startNamedPiped(pipeName: string, connectedService: string) { + // Path to your PowerShell script + const content = ` +# Create a security descriptor to allow Everyone to access the pipe +$pipePath = "/tmp/$pipeName" + +# Create a named pipe with the specified security +$pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + +# Set permissions using chmod +bash -c "chmod 777 $pipePath" + +Write-Host "Waiting for a connection..." +$pipe.WaitForConnection() + +Write-Host "Client connected." + +# Send a message to the client +$message = "Hello from the server!" +$writer = New-Object System.IO.StreamWriter($pipe) +$writer.WriteLine($message) +$writer.Flush() + +# Close the pipe +$writer.Close() +$pipe.Close() + `; - try { - // Execute the PowerShell script, making cmdlets available to the pipeline - const output = execSync(`powershell -Command "Import-Module $PSScriptRoot\\ps_modules\\VstsAzureHelpers_"`); - console.log(output.toString()); - } catch (error) { - console.error(`Error running PowerShell script: ${error.message}`); - } -} + // Spawn the PowerShell process + let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); -// Main function to run when the task is executed -function runTask() { - // Inject the custom cmdlet by running the script that defines it - runPowerShellScript('powershell.ps1'); + powershell.arg('-ExecutionPolicy') + .arg('Bypass') + .arg('-Command') + .arg(content); - console.log("PowerShell cmdlet injected successfully."); + let options = { + failOnStdErr: false, + errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out + outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. + ignoreReturnCode: true + }; + + // Execute the PowerShell command and capture the output + const result = await powershell.exec(options); + + // Check the result and set the task result + if (result === 0) { + tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); + } else { + tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); + } + + // Handle PowerShell exit + powershell.on('close', (code) => { + console.log(`PowerShell process exited with code ${code}`); + }); + + return powershell; } async function run() { + let server; try { - tl.setResourcePath(path.join(__dirname, 'task.json')); - // runTask() // Get inputs. + + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + let pipe_name : string = "praval"; + server = startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); let input_informationPreference: string = getActionPreference('informationPreference', 'Default'); let input_verbosePreference: string = getActionPreference('verbosePreference', 'Default'); let input_debugPreference: string = getActionPreference('debugPreference', 'Default'); let input_progressPreference: string = getActionPreference('progressPreference', 'SilentlyContinue'); - let input_showWarnings = tl.getBoolInput('showWarnings', false); let input_failOnStderr = tl.getBoolInput('failOnStderr', false); let input_ignoreLASTEXITCODE = tl.getBoolInput('ignoreLASTEXITCODE', false); @@ -60,6 +106,7 @@ async function run() { let input_arguments: string; let input_script: string; let input_targetType: string = tl.getInput('targetType') || ''; + if (input_targetType.toUpperCase() == 'FILEPATH') { input_filePath = tl.getPathInput('filePath', /*required*/ true); if (!tl.stats(input_filePath).isFile() || !input_filePath.toUpperCase().match(/\.PS1$/)) { @@ -98,12 +145,6 @@ async function run() { contents.push(`$ProgressPreference = '${input_progressPreference}'`); } - const directory1: string = process.cwd(); - const directory2: string = path.resolve(); - - console.log(directory1); - console.log(directory2); - let script = ''; if (input_targetType.toUpperCase() == 'FILEPATH') { @@ -127,6 +168,40 @@ async function run() { } else { script = `${input_script}`; } + + if (connectedServiceName && connectedServiceName.trim().length > 0) { + script = ` + function Get-Token { + + $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + try { + $pipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + $writer = New-Object System.IO.StreamWriter($pipe) + $reader = New-Object System.IO.StreamReader($pipe) + + # Send a message to the server + $message = "Hello from PowerShell!" + $writer.WriteLine($message) + $writer.Flush() + + # Read the response + $response = $reader.ReadLine() + Write-Host "Received from server: $response" + } + catch { + Write-Host "Error: $_" + } + finally { + $pipe.Dispose() + } + } + + ${script} + `; + } + if (input_showWarnings) { script = ` $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -141,6 +216,9 @@ async function run() { Invoke-Command {${script}} -WarningVariable +warnings; `; } + + tl.debug(script); + contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); @@ -218,6 +296,9 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } + finally { + server.kill(); + } } run(); diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index 9c204e7e0849..a5645e63cda8 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 1 + "Minor": 247, + "Patch": 11 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Resource Manager connection", + "defaultValue": "", + "helpMarkDown": "Select an Azure Resource Manager service connection" + }, { "name": "targetType", "type": "radio", @@ -263,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.245.0", - "Node20-225": "2.245.1" + "Default": "2.247.10", + "Node20-225": "2.247.11" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index c1481df61559..c7a3c5ed2328 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 245, - "Patch": 1 + "Minor": 247, + "Patch": 11 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -36,6 +36,16 @@ } ], "inputs": [ + { + "name": "ConnectedServiceName", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "ms-resource:loc.input.label.ConnectedServiceName", + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceName" + }, { "name": "targetType", "type": "radio", @@ -263,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.245.0", - "Node20-225": "2.245.1" + "Default": "2.247.10", + "Node20-225": "2.247.11" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/tsconfig.json b/_generated/PowerShellV2_Node20/tsconfig.json index 0438b79f69ac..a347ba35a9ac 100644 --- a/_generated/PowerShellV2_Node20/tsconfig.json +++ b/_generated/PowerShellV2_Node20/tsconfig.json @@ -1,6 +1,12 @@ { "compilerOptions": { - "target": "ES6", - "module": "commonjs" - } + "module": "commonjs", + "target": "es6", + "sourceMap":true, + "skipLibCheck": true, + "esModuleInterop": true + }, + "exclude": [ + "node_modules" + ] } \ No newline at end of file From 37224382f17444b3e00df490a57e87cc80474ac4 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Wed, 30 Oct 2024 12:39:19 +0530 Subject: [PATCH 04/13] Powershell Task --- .../VstsAzureRestHelpers_.psm1 | 59 ++--- Tasks/PowerShellV2/powershell.ps1 | 143 ++++++++++++ Tasks/PowerShellV2/powershell.ts | 191 +++++++++++++--- Tasks/PowerShellV2/task.json | 4 +- Tasks/PowerShellV2/task.loc.json | 4 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/powershell.ps1 | 143 ++++++++++++ _generated/PowerShellV2/powershell.ts | 214 ++++++++++++++---- _generated/PowerShellV2/task.json | 8 +- _generated/PowerShellV2/task.loc.json | 8 +- _generated/PowerShellV2_Node20/powershell.ps1 | 143 ++++++++++++ _generated/PowerShellV2_Node20/powershell.ts | 214 ++++++++++++++---- _generated/PowerShellV2_Node20/task.json | 8 +- _generated/PowerShellV2_Node20/task.loc.json | 8 +- 14 files changed, 988 insertions(+), 163 deletions(-) diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index bd26f0561eae..61f8e71c932d 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -164,9 +164,6 @@ function Get-EnvironmentAuthUrl { ) $stringOb = $endpoint | Out-String - Write-Host $stringOb - Write-Host $endpoint.Data - Write-Host $endpoint.Data.activeDirectoryAuthority $envAuthUrl = if ($useMSAL) { $endpoint.Data.activeDirectoryAuthority } else { $endpoint.Data.environmentAuthorityUrl } @@ -183,10 +180,6 @@ function Get-EnvironmentAuthUrl { } } - Write-Host "MSAL - Get-EnvironmentAuthUrl - endpoint=$endpoint" - Write-Host "MSAL - Get-EnvironmentAuthUrl - useMSAL=$useMSAL" - Write-Host "MSAL - Get-EnvironmentAuthUrl - envAuthUrl=$envAuthUrl" - return $envAuthUrl } @@ -362,16 +355,12 @@ function Build-MSALInstance { [CmdletBinding()] param( [Parameter(Mandatory = $true)] $endpoint, - [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, - [string][Parameter(Mandatory=$false)] $vstsAccessToken + [string][Parameter(Mandatory=$false)] $connectedServiceNameARM ) $clientId = $endpoint.Auth.Parameters.ServicePrincipalId - Write-Host $clientId $tenantId = $endpoint.Auth.Parameters.TenantId - Write-Host $tenantId $envAuthUrl = Get-EnvironmentAuthUrl -endpoint $endpoint -useMSAL $true - Write-Host $envAuthUrl try { # load the MSAL library @@ -390,10 +379,10 @@ function Build-MSALInstance { elseif ($endpoint.Auth.Scheme -eq $wifConnection) { Write-Verbose "MSAL - WorkloadIdentityFederation is used"; - if ([string]::IsNullOrWhiteSpace($vstsAccessToken)) { - $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require - $vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken - } + $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require + $vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken + + Write-Verbose "ServiceConnectionId ${connectedServiceNameARM} and vstsAccessToken ${vstsAccessToken}" $oidc_token = Get-VstsFederatedToken -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken @@ -419,13 +408,12 @@ function Get-MSALInstance { [CmdletBinding()] param( [Parameter(Mandatory = $true)] $endpoint, - [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, - [string][Parameter(Mandatory=$false)] $vstsAccessToken + [string][Parameter(Mandatory=$false)] $connectedServiceNameARM ) # build MSAL if instance does not exist if ($null -eq $script:msalClientInstance) { - $script:msalClientInstance = Build-MSALInstance $endpoint $connectedServiceNameARM $vstsAccessToken + $script:msalClientInstance = Build-MSALInstance $endpoint $connectedServiceNameARM } return $script:msalClientInstance @@ -1389,10 +1377,12 @@ function Get-VstsFederatedToken { $jsAssembly = [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") + Write-Verbose "vsServiceDll ${vsServicesDll}" if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { Write-Verbose "$vsServicesDll not found." throw } + try { Add-Type -LiteralPath $vsServicesDll } catch { @@ -1410,12 +1400,27 @@ function Get-VstsFederatedToken { Write-Verbose "Unable to resolve assembly name '$($e.Name)'" return $null } - [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) + + try{ + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" + [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) + } catch { + Write-Verbose "CurrentDomain exception : $_" + } + $taskHttpClient = $null; try { Write-Verbose "Trying again to construct the HTTP client." + Write-Verbose "Trying with the external token" + $vstsAccessToken = $env:vstsAccessTok + Write-Verbose "Token : $vstsAccessToken" + $federatedCredential = New-Object Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential($vstsAccessToken) + + Write-Verbose "Post : federatedCredential $federatedCredential" + $uri = Get-VstsTaskVariable -Name 'System.CollectionUri' -Require $vssCredentials = New-Object Microsoft.VisualStudio.Services.Common.VssCredentials( (New-Object Microsoft.VisualStudio.Services.Common.WindowsCredential($false)), # Do not use default credentials. @@ -1458,20 +1463,20 @@ function Get-AccessTokenMSALWithCustomScope { param( [Parameter(Mandatory = $true)] $endpoint, [string][Parameter(Mandatory=$false)] $connectedServiceNameARM, - [string][Parameter(Mandatory=$false)] $scope, - [string][Parameter(Mandatory=$false)] $vstsAccessToken + [string][Parameter(Mandatory=$false)] $scope ) - if ([string]::IsNullOrWhiteSpace($vstsAccessToken)) { + try { Get-MSALInstance $endpoint $connectedServiceNameARM - } else { - Write-Host "yo" - Get-MSALInstance $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Host "Get-MSALInstance completed" + } catch { + Write-Host "Get-MSALInstance failed with $_" } - + # prepare MSAL scopes [string] $resourceId = $scope + "/.default" $scopes = [Collections.Generic.List[string]]@($resourceId) + try { Write-Verbose "Fetching Access Token - MSAL" $tokenResult = $script:msalClientInstance.AcquireTokenForClient($scopes).ExecuteAsync().GetAwaiter().GetResult() diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 3aa4ffa99a23..9f6ef8c39e06 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -2,9 +2,85 @@ param() Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +function StartNamedPiped($connectedServiceName) { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Host "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName + Write-Host "Received: $line" + Write-Host "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() +} + +class MyClass { + + [string] GetConnectedServiceNameAccessToken() + { + Set-PSDebug -Trace 1 + $DebugPreference = "Continue" + + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Host " ConnectionServiceName : ${connectedServiceName}" + + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $vstsEndpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + Write-Host $accessToken.token_type + Write-Host $accessToken.access_token + Write-Host $accessToken.expires_on + + return "Success" + } catch { + Write-Host $_ + return "Failed" + } + } +} + function Get-ActionPreference { param ( [Parameter(Mandatory)] @@ -33,6 +109,39 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require + $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken + $env:vstsAccessTok = $vstsAccessTok + + # Create a runspace to handle the Get-DerivedValue function + $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) + $runspacePool.Open() + + $myObject = [MyClass]::new() + + # Create a PowerShell instance within the runspace pool + $psRunspace = [powershell]::Create().AddScript({ + param($obj) + try { + $result = $obj.GetConnectedServiceNameAccessToken() + return $result + } catch { + return $_ + } + }).AddArgument($myObject) + + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" + + $psRunspace.RunspacePool = $runspacePool + $asyncResult = $psRunspace.BeginInvoke() + $derivedValue = $psRunspace.EndInvoke($asyncResult) + + # $myObject.GetConnectedServiceNameAccessToken() + + # Output the derived value + Write-Output "The derived value is: $derivedValue" + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -133,6 +242,40 @@ try { $joinedContents = [System.String]::Join( ([System.Environment]::NewLine), $contents); + + if (![string]::IsNullOrEmpty($connectedServiceName)) { + $joinedContents = ' + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + + $input = "Get-AzDoToken" + + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + + } + catch { + Write-Host "Error: $_" + } + } + + ' + $joinedContents; + } + + Write-Host $joinedContents + if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 22439ef80fa9..06191ff10ad1 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -6,9 +6,86 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); +const { exec } = require('child_process'); +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; +import * as net from 'net'; +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string + ): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -22,6 +99,7 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def async function startNamedPiped(pipeName: string, connectedService: string) { const content = ` + # Create a security descriptor to allow Everyone to access the pipe $pipePath = "/tmp/$pipeName" @@ -34,26 +112,67 @@ async function startNamedPiped(pipeName: string, connectedService: string) { Write-Host "Waiting for a connection..." $pipe.WaitForConnection() + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force + + $connectedServiceName = "${connectedService}" + + Write-Host "Client connected." - # Send a message to the client - $message = "Hello from the server!" - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($message) - $writer.Flush() + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + Write-Host "Hey" + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = $line + Write-Host "Received: $line" + Write-Host "Sending response: $response" + + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + try { + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $endpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + } catch { + Write-Host $_ + } + + + Write-Host $accessToken; + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($accessToken) + $writer.Flush() + } # Close the pipe - $writer.Close() + $reader.Close() $pipe.Close() `; // Spawn the PowerShell process let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - powershell.arg('-ExecutionPolicy') - .arg('Bypass') - .arg('-Command') - .arg(content); + powershell.arg('-Command').arg(content); let options = { failOnStdErr: false, @@ -80,16 +199,32 @@ async function startNamedPiped(pipeName: string, connectedService: string) { return powershell; } +function findPowerShellPath(): Promise { + return new Promise((resolve, reject) => { + const command = 'which pwsh'; + + exec(command, (error, stdout, stderr) => { + if (error) { + console.error(`Error finding PowerShell: ${stderr}`); + resolve(null); + } else { + resolve(stdout.trim()); + } + }); + }); +} + async function run() { - let server; try { // Get inputs. const connectedServiceName = tl.getInput("ConnectedServiceName", false); console.log("connectedServiceName: " + connectedServiceName); + // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); let pipe_name : string = "praval"; - server = startNamedPiped(pipe_name, connectedServiceName); + startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -170,31 +305,30 @@ async function run() { if (connectedServiceName && connectedServiceName.trim().length > 0) { script = ` - function Get-Token { - $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-Token { try { - $pipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $writer = New-Object System.IO.StreamWriter($pipe) - $reader = New-Object System.IO.StreamReader($pipe) + $input = "Input" - # Send a message to the server - $message = "Hello from PowerShell!" - $writer.WriteLine($message) + # Send command to the server + $writer.WriteLine($input) $writer.Flush() - # Read the response + # Read response from the server $response = $reader.ReadLine() - Write-Host "Received from server: $response" + Write-Host "Server response: $response" + } catch { Write-Host "Error: $_" } - finally { - $pipe.Dispose() - } } ${script} @@ -295,9 +429,6 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } - finally { - server.kill(); - } } run(); diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index c2575eb03fea..eafcec31dbcf 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 10 + "Minor": 248, + "Patch": 44 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 8d457b089c69..ef7744fcdcd9 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 10 + "Minor": 248, + "Patch": 44 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index fdb971f0e011..853fb81ff548 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.247.10 -Node20-225|2.247.11 +Default|2.248.44 +Node20-225|2.248.45 diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 3aa4ffa99a23..9f6ef8c39e06 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -2,9 +2,85 @@ param() Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +function StartNamedPiped($connectedServiceName) { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Host "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName + Write-Host "Received: $line" + Write-Host "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() +} + +class MyClass { + + [string] GetConnectedServiceNameAccessToken() + { + Set-PSDebug -Trace 1 + $DebugPreference = "Continue" + + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Host " ConnectionServiceName : ${connectedServiceName}" + + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $vstsEndpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + Write-Host $accessToken.token_type + Write-Host $accessToken.access_token + Write-Host $accessToken.expires_on + + return "Success" + } catch { + Write-Host $_ + return "Failed" + } + } +} + function Get-ActionPreference { param ( [Parameter(Mandatory)] @@ -33,6 +109,39 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require + $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken + $env:vstsAccessTok = $vstsAccessTok + + # Create a runspace to handle the Get-DerivedValue function + $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) + $runspacePool.Open() + + $myObject = [MyClass]::new() + + # Create a PowerShell instance within the runspace pool + $psRunspace = [powershell]::Create().AddScript({ + param($obj) + try { + $result = $obj.GetConnectedServiceNameAccessToken() + return $result + } catch { + return $_ + } + }).AddArgument($myObject) + + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" + + $psRunspace.RunspacePool = $runspacePool + $asyncResult = $psRunspace.BeginInvoke() + $derivedValue = $psRunspace.EndInvoke($asyncResult) + + # $myObject.GetConnectedServiceNameAccessToken() + + # Output the derived value + Write-Output "The derived value is: $derivedValue" + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -133,6 +242,40 @@ try { $joinedContents = [System.String]::Join( ([System.Environment]::NewLine), $contents); + + if (![string]::IsNullOrEmpty($connectedServiceName)) { + $joinedContents = ' + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + + $input = "Get-AzDoToken" + + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + + } + catch { + Write-Host "Error: $_" + } + } + + ' + $joinedContents; + } + + Write-Host $joinedContents + if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index d820bfee77e0..06191ff10ad1 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -6,9 +6,86 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); +const { exec } = require('child_process'); +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; +import * as net from 'net'; +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string + ): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -21,40 +98,81 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def } async function startNamedPiped(pipeName: string, connectedService: string) { - // Path to your PowerShell script const content = ` -# Create a security descriptor to allow Everyone to access the pipe -$pipePath = "/tmp/$pipeName" -# Create a named pipe with the specified security -$pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + # Create a security descriptor to allow Everyone to access the pipe + $pipePath = "/tmp/$pipeName" + + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + + # Set permissions using chmod + # bash -c "chmod 777 $pipePath" + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force -# Set permissions using chmod -bash -c "chmod 777 $pipePath" + $connectedServiceName = "${connectedService}" -Write-Host "Waiting for a connection..." -$pipe.WaitForConnection() -Write-Host "Client connected." + Write-Host "Client connected." -# Send a message to the client -$message = "Hello from the server!" -$writer = New-Object System.IO.StreamWriter($pipe) -$writer.WriteLine($message) -$writer.Flush() + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + Write-Host "Hey" + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = $line + Write-Host "Received: $line" + Write-Host "Sending response: $response" -# Close the pipe -$writer.Close() -$pipe.Close() + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + try { + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $endpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + } catch { + Write-Host $_ + } + + + Write-Host $accessToken; + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($accessToken) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() `; // Spawn the PowerShell process let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - powershell.arg('-ExecutionPolicy') - .arg('Bypass') - .arg('-Command') - .arg(content); + powershell.arg('-Command').arg(content); let options = { failOnStdErr: false, @@ -81,16 +199,32 @@ $pipe.Close() return powershell; } +function findPowerShellPath(): Promise { + return new Promise((resolve, reject) => { + const command = 'which pwsh'; + + exec(command, (error, stdout, stderr) => { + if (error) { + console.error(`Error finding PowerShell: ${stderr}`); + resolve(null); + } else { + resolve(stdout.trim()); + } + }); + }); +} + async function run() { - let server; try { // Get inputs. const connectedServiceName = tl.getInput("ConnectedServiceName", false); console.log("connectedServiceName: " + connectedServiceName); + // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); let pipe_name : string = "praval"; - server = startNamedPiped(pipe_name, connectedServiceName); + startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -171,31 +305,30 @@ async function run() { if (connectedServiceName && connectedServiceName.trim().length > 0) { script = ` - function Get-Token { - $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-Token { try { - $pipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $writer = New-Object System.IO.StreamWriter($pipe) - $reader = New-Object System.IO.StreamReader($pipe) + $input = "Input" - # Send a message to the server - $message = "Hello from PowerShell!" - $writer.WriteLine($message) + # Send command to the server + $writer.WriteLine($input) $writer.Flush() - # Read the response + # Read response from the server $response = $reader.ReadLine() - Write-Host "Received from server: $response" + Write-Host "Server response: $response" + } catch { Write-Host "Error: $_" } - finally { - $pipe.Dispose() - } } ${script} @@ -296,9 +429,6 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } - finally { - server.kill(); - } } run(); diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 35b108d060cc..7090e45af520 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 10 + "Minor": 248, + "Patch": 44 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.247.10", - "Node20-225": "2.247.11" + "Default": "2.248.44", + "Node20-225": "2.248.45" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index 22165d05a432..81c52da7e9a4 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 10 + "Minor": 248, + "Patch": 44 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.247.10", - "Node20-225": "2.247.11" + "Default": "2.248.44", + "Node20-225": "2.248.45" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 3aa4ffa99a23..9f6ef8c39e06 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -2,9 +2,85 @@ param() Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +function StartNamedPiped($connectedServiceName) { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Host "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName + Write-Host "Received: $line" + Write-Host "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() +} + +class MyClass { + + [string] GetConnectedServiceNameAccessToken() + { + Set-PSDebug -Trace 1 + $DebugPreference = "Continue" + + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Host " ConnectionServiceName : ${connectedServiceName}" + + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $vstsEndpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + Write-Host $accessToken.token_type + Write-Host $accessToken.access_token + Write-Host $accessToken.expires_on + + return "Success" + } catch { + Write-Host $_ + return "Failed" + } + } +} + function Get-ActionPreference { param ( [Parameter(Mandatory)] @@ -33,6 +109,39 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require + $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken + $env:vstsAccessTok = $vstsAccessTok + + # Create a runspace to handle the Get-DerivedValue function + $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) + $runspacePool.Open() + + $myObject = [MyClass]::new() + + # Create a PowerShell instance within the runspace pool + $psRunspace = [powershell]::Create().AddScript({ + param($obj) + try { + $result = $obj.GetConnectedServiceNameAccessToken() + return $result + } catch { + return $_ + } + }).AddArgument($myObject) + + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" + + $psRunspace.RunspacePool = $runspacePool + $asyncResult = $psRunspace.BeginInvoke() + $derivedValue = $psRunspace.EndInvoke($asyncResult) + + # $myObject.GetConnectedServiceNameAccessToken() + + # Output the derived value + Write-Output "The derived value is: $derivedValue" + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -133,6 +242,40 @@ try { $joinedContents = [System.String]::Join( ([System.Environment]::NewLine), $contents); + + if (![string]::IsNullOrEmpty($connectedServiceName)) { + $joinedContents = ' + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + + $input = "Get-AzDoToken" + + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + + } + catch { + Write-Host "Error: $_" + } + } + + ' + $joinedContents; + } + + Write-Host $joinedContents + if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index d820bfee77e0..06191ff10ad1 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -6,9 +6,86 @@ import tr = require('azure-pipelines-task-lib/toolrunner'); import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; -import { spawn, exec } from 'child_process'; var uuidV4 = require('uuid/v4'); +const { exec } = require('child_process'); +import * as msal from "@azure/msal-node"; +import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; +import * as net from 'net'; +export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { + + // workloadidentityfederation + const authorizationScheme = tl + .getEndpointAuthorizationSchemeRequired(connectedService) + .toLowerCase(); + + // get token using workload identity federation or managed service identity + if (authorizationScheme !== "workloadidentityfederation") { + throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); + } + + // use azure devops webapi to get federated token using service connection + var servicePrincipalId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); + + var servicePrincipalTenantId: string = + tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); + + const authorityUrl = + tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; + + tl.debug(`Getting federated token for service connection ${connectedService}`); + + var federatedToken: string = await getFederatedToken(connectedService); + + tl.debug(`Got federated token for service connection ${connectedService}`); + + // exchange federated token for service principal token (below) + return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); +} + +async function getAccessTokenFromFederatedToken( + servicePrincipalId: string, + servicePrincipalTenantId: string, + federatedToken: string, + authorityUrl: string + ): Promise { + const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; + + // use msal to get access token using service principal with federated token + tl.debug(`Using authority url: ${authorityUrl}`); + tl.debug(`Using resource: ${AzureDevOpsResourceId}`); + + const config: msal.Configuration = { + auth: { + clientId: servicePrincipalId, + authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, + clientAssertion: federatedToken, + }, + system: { + loggerOptions: { + loggerCallback: (level, message, containsPii) => { + tl.debug(message); + }, + piiLoggingEnabled: false, + logLevel: msal.LogLevel.Verbose, + }, + }, + }; + + const app = new msal.ConfidentialClientApplication(config); + + const request: msal.ClientCredentialRequest = { + scopes: [`${AzureDevOpsResourceId}/.default`], + skipCache: true, + }; + + const result = await app.acquireTokenByClientCredential(request); + + tl.debug(`Got access token for service principal ${servicePrincipalId}`); + + return result?.accessToken; +} function getActionPreference(vstsInputName: string, defaultAction: string = 'Default', validActions: string[] = ['Default', 'Stop', 'Continue', 'SilentlyContinue']) { let result: string = tl.getInput(vstsInputName, false) || defaultAction; @@ -21,40 +98,81 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def } async function startNamedPiped(pipeName: string, connectedService: string) { - // Path to your PowerShell script const content = ` -# Create a security descriptor to allow Everyone to access the pipe -$pipePath = "/tmp/$pipeName" -# Create a named pipe with the specified security -$pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + # Create a security descriptor to allow Everyone to access the pipe + $pipePath = "/tmp/$pipeName" + + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") + + # Set permissions using chmod + # bash -c "chmod 777 $pipePath" + + Write-Host "Waiting for a connection..." + $pipe.WaitForConnection() + + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force + Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force -# Set permissions using chmod -bash -c "chmod 777 $pipePath" + $connectedServiceName = "${connectedService}" -Write-Host "Waiting for a connection..." -$pipe.WaitForConnection() -Write-Host "Client connected." + Write-Host "Client connected." -# Send a message to the client -$message = "Hello from the server!" -$writer = New-Object System.IO.StreamWriter($pipe) -$writer.WriteLine($message) -$writer.Flush() + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + Write-Host "Hey" + $line = $reader.ReadLine() + if ($line -eq $null) { break } + + $response = $line + Write-Host "Received: $line" + Write-Host "Sending response: $response" -# Close the pipe -$writer.Close() -$pipe.Close() + $accessToken = @{ + token_type = $null + access_token = $null + expires_on = $null + } + + try { + Write-Host "endpoint for connectedServiceName: $connectedServiceName"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + Write-Host "endpoint: $endpoint"; + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $accessToken.token_type = $result.TokenType + $accessToken.access_token = $result.AccessToken + $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + + Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; + } catch { + Write-Host $_ + } + + + Write-Host $accessToken; + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($accessToken) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() `; // Spawn the PowerShell process let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - powershell.arg('-ExecutionPolicy') - .arg('Bypass') - .arg('-Command') - .arg(content); + powershell.arg('-Command').arg(content); let options = { failOnStdErr: false, @@ -81,16 +199,32 @@ $pipe.Close() return powershell; } +function findPowerShellPath(): Promise { + return new Promise((resolve, reject) => { + const command = 'which pwsh'; + + exec(command, (error, stdout, stderr) => { + if (error) { + console.error(`Error finding PowerShell: ${stderr}`); + resolve(null); + } else { + resolve(stdout.trim()); + } + }); + }); +} + async function run() { - let server; try { // Get inputs. const connectedServiceName = tl.getInput("ConnectedServiceName", false); console.log("connectedServiceName: " + connectedServiceName); + // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); let pipe_name : string = "praval"; - server = startNamedPiped(pipe_name, connectedServiceName); + startNamedPiped(pipe_name, connectedServiceName); + let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -171,31 +305,30 @@ async function run() { if (connectedServiceName && connectedServiceName.trim().length > 0) { script = ` - function Get-Token { - $pipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-Token { try { - $pipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $writer = New-Object System.IO.StreamWriter($pipe) - $reader = New-Object System.IO.StreamReader($pipe) + $input = "Input" - # Send a message to the server - $message = "Hello from PowerShell!" - $writer.WriteLine($message) + # Send command to the server + $writer.WriteLine($input) $writer.Flush() - # Read the response + # Read response from the server $response = $reader.ReadLine() - Write-Host "Received from server: $response" + Write-Host "Server response: $response" + } catch { Write-Host "Error: $_" } - finally { - $pipe.Dispose() - } } ${script} @@ -296,9 +429,6 @@ async function run() { catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); } - finally { - server.kill(); - } } run(); diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index a5645e63cda8..ac47160dd36d 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 11 + "Minor": 248, + "Patch": 45 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.247.10", - "Node20-225": "2.247.11" + "Default": "2.248.44", + "Node20-225": "2.248.45" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index c7a3c5ed2328..96c5abe88b4a 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 247, - "Patch": 11 + "Minor": 248, + "Patch": 45 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.247.10", - "Node20-225": "2.247.11" + "Default": "2.248.44", + "Node20-225": "2.248.45" } } \ No newline at end of file From bf4f2e057e9dd1e35d0a0b16b71b5ebcdfd37470 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Mon, 4 Nov 2024 14:15:11 +0530 Subject: [PATCH 05/13] cleanup --- .../Common/VstsAzureHelpers_/AzDoHelpers.ps1 | 54 ------------------- .../VstsAzureHelpers_/VstsAzureHelpers_.psm1 | 2 - .../VstsAzureRestHelpers_.psm1 | 19 ++++--- 3 files changed, 9 insertions(+), 66 deletions(-) delete mode 100644 Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 diff --git a/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 b/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 deleted file mode 100644 index d0188967c568..000000000000 --- a/Tasks/Common/VstsAzureHelpers_/AzDoHelpers.ps1 +++ /dev/null @@ -1,54 +0,0 @@ -function Get-AzDOToken() -{ - $connectionServiceName = $env:AZURESUBSCRIPTION_SERVICE_CONNECTION_ID - $servicePrincipalId = $env:AZURESUBSCRIPTION_CLIENT_ID - $tenantId = $env:AZURESUBSCRIPTION_TENANT_ID - $activeDirectoryAuthority = "https://login.microsoftonline.com/$tenantId/" - $vstsAccessToken = $env:VSTS_ACCESS_TOKEN - $scheme = "WorkloadIdentityFederation" - - if ($null -eq $connectionServiceName -or $connectionServiceName -eq "") { - Write-Host "Returning System.AccessToken" - return System.AccessToken - } - - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } - - Import-Module $PSScriptRoot/../../ps_modules/VstsAzureRestHelpers_ -Force - - $parameters = @{ - TenantId = $tenantId - ServicePrincipalId = $servicePrincipalId - } - - $auth = @{ - Scheme = $scheme - Parameters = $parameters - } - - $data = @{ - activeDirectoryAuthority = $activeDirectoryAuthority - } - - $vstsEndpoint = @{ - Auth = $auth - Data = $data - } - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectionServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" ` - -vstsAccessToken $vstsAccessToken - - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() - - Write-Host "Get-connectionServiceNameAccessToken: Received accessToken"; - - return $accessToken; -} \ No newline at end of file diff --git a/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 b/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 index 48bf83899426..5d467bd5fe28 100644 --- a/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 +++ b/Tasks/Common/VstsAzureHelpers_/VstsAzureHelpers_.psm1 @@ -28,7 +28,6 @@ if (-not $featureFlags.retireAzureRM) { . $PSScriptRoot/InitializeFunctions.ps1 . $PSScriptRoot/InitializeAzModuleFunctions.ps1 . $PSScriptRoot/PsModuleUtility.ps1 -. $PSScriptRoot/AzDoHelpers.ps1 # This is the only public function. function Initialize-Azure { @@ -97,4 +96,3 @@ if (-not $featureFlags.retireAzureRM) { Export-ModuleMember -Function Initialize-AzModule Export-ModuleMember -Function Disconnect-AzureAndClearContext Export-ModuleMember -Function Update-PSModulePathForHostedAgentWithLatestModule -Export-ModuleMember -Function Get-AzDOToken diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index 61f8e71c932d..80d3f1944195 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -163,8 +163,6 @@ function Get-EnvironmentAuthUrl { [Parameter(Mandatory = $false)] $useMSAL = $false ) - $stringOb = $endpoint | Out-String - $envAuthUrl = if ($useMSAL) { $endpoint.Data.activeDirectoryAuthority } else { $endpoint.Data.environmentAuthorityUrl } if ([string]::IsNullOrEmpty($envAuthUrl)) { @@ -180,6 +178,10 @@ function Get-EnvironmentAuthUrl { } } + Write-Verbose "MSAL - Get-EnvironmentAuthUrl - endpoint=$endpoint" + Write-Verbose "MSAL - Get-EnvironmentAuthUrl - useMSAL=$useMSAL" + Write-Verbose "MSAL - Get-EnvironmentAuthUrl - envAuthUrl=$envAuthUrl" + return $envAuthUrl } @@ -1290,7 +1292,6 @@ function Get-AzureLoadBalancerDetails { } function Get-AzureRMLoadBalancerFrontendIpConfigDetails { - [CmdletBinding()] param([Object] [Parameter(Mandatory = $true)] $loadBalancer) @@ -1378,6 +1379,7 @@ function Get-VstsFederatedToken { $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") Write-Verbose "vsServiceDll ${vsServicesDll}" + if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { Write-Verbose "$vsServicesDll not found." throw @@ -1401,13 +1403,10 @@ function Get-VstsFederatedToken { return $null } - try{ - $a = [System.AppDomain]::CurrentDomain - Write-Host "[System.AppDomain]::CurrentDomain $a" - [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) - } catch { - Write-Verbose "CurrentDomain exception : $_" - } + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" + + [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) $taskHttpClient = $null; From eccc88b7ee7bc6cc50a2da26d216a1724bc59e18 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Mon, 11 Nov 2024 10:26:41 +0530 Subject: [PATCH 06/13] Token gen worked for Windows --- .../VstsAzureRestHelpers_.psm1 | 111 ++++++++---- Tasks/PowerShellV2/powershell.ps1 | 169 ++++++++---------- Tasks/PowerShellV2/task.json | 2 +- Tasks/PowerShellV2/task.loc.json | 2 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/powershell.ps1 | 169 ++++++++---------- _generated/PowerShellV2/task.json | 6 +- _generated/PowerShellV2/task.loc.json | 6 +- _generated/PowerShellV2_Node20/powershell.ps1 | 169 ++++++++---------- _generated/PowerShellV2_Node20/task.json | 6 +- _generated/PowerShellV2_Node20/task.loc.json | 6 +- 11 files changed, 313 insertions(+), 337 deletions(-) diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index 80d3f1944195..782b7fd27788 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -386,7 +386,7 @@ function Build-MSALInstance { Write-Verbose "ServiceConnectionId ${connectedServiceNameARM} and vstsAccessToken ${vstsAccessToken}" - $oidc_token = Get-VstsFederatedToken -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken + $oidc_token = Get-VstsFederatedTokenModified -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken $msalClientInstance = $clientBuilder.WithClientAssertion($oidc_token).Build() } @@ -1360,7 +1360,7 @@ function ConvertTo-Pfx { return $pfxFilePath, $pfxFilePassword } -function Get-VstsFederatedToken { +function Get-VstsFederatedTokenModified { param( [Parameter(Mandatory=$true)] [string]$serviceConnectionId, @@ -1368,53 +1368,92 @@ function Get-VstsFederatedToken { [string]$vstsAccessToken ) - $OMDirectory = $PSScriptRoot + $planId = Get-VstsTaskVariable -Name 'System.PlanId' -Require + $jobId = Get-VstsTaskVariable -Name 'System.JobId' -Require + $hub = Get-VstsTaskVariable -Name 'System.HostType' -Require + $projectId = Get-VstsTaskVariable -Name 'System.TeamProjectId' -Require - $newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll") - if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) { - Write-Verbose "$newtonsoftDll not found." - throw + # Construct the API URL + $url = "https://dev.azure.com/prsinghal1/$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" + Write-Verbose $url + + $headers = @{ + "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($vstsAccessToken)")) + "Content-Type" = "application/json" } - $jsAssembly = [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) + + # Make the POST request to generate the OIDC token + $response = Invoke-WebRequest -Uri $url -Method Post -Headers $headers -Body $body - $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") - Write-Verbose "vsServiceDll ${vsServicesDll}" + Write-Verbose "Response : $response" - if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { - Write-Verbose "$vsServicesDll not found." - throw - } + # Parse the response content to extract the OIDC token + $responseContent = $response.Content | ConvertFrom-Json + Write-Verbose "responseContent : $responseContent" + $oidcToken = $responseContent.oidcToken # The token field contains the OIDC token - try { - Add-Type -LiteralPath $vsServicesDll - } catch { - # The requested type may successfully load now even though the assembly itself is not fully loaded. - Write-Verbose "$($_.Exception.GetType().FullName): $($_.Exception.Message)" - } - $onAssemblyResolve = [System.ResolveEventHandler] { - param($sender, $e) + if ($null -eq $oidcToken -or $oidcToken -eq [string]::Empty) { + Write-Verbose "Failed to create OIDC token." + throw (New-Object System.Exception(Get-VstsLocString -Key AZ_CouldNotGenerateOidcToken)) + } + Write-Verbose "Token generated $oidcToken" + return $oidcToken +} - if ($e.Name -like 'Newtonsoft.Json, *') { - return $jsAssembly - } +function Get-VstsFederatedToken { + param( + [Parameter(Mandatory=$true)] + [string]$serviceConnectionId, + [Parameter(Mandatory=$true)] + [string]$vstsAccessToken + ) - Write-Verbose "Unable to resolve assembly name '$($e.Name)'" - return $null - } + $OMDirectory = $PSScriptRoot - $a = [System.AppDomain]::CurrentDomain - Write-Host "[System.AppDomain]::CurrentDomain $a" + # $newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll") + # if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) { + # Write-Verbose "$newtonsoftDll not found." + # throw + # } + # Write-Verbose "newtonsoftDll ${newtonsoftDll}" + # $jsAssembly = [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) + + # $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") + # Write-Verbose "vsServiceDll ${vsServicesDll}" + + # if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { + # Write-Verbose "$vsServicesDll not found." + # throw + # } + + # try { + # Add-Type -LiteralPath $vsServicesDll + # } catch { + # # The requested type may successfully load now even though the assembly itself is not fully loaded. + # Write-Verbose "$($_.Exception.GetType().FullName): $($_.Exception.Message)" + # } + + # $onAssemblyResolve = [System.ResolveEventHandler] { + # param($sender, $e) + + # if ($e.Name -like 'Newtonsoft.Json, *') { + # return $Global:jsAssembly + # } + + # Write-Verbose "Unable to resolve assembly name '$($e.Name)'" + # return $null + # } + + # $a = [System.AppDomain]::CurrentDomain + # Write-Host "[System.AppDomain]::CurrentDomain $a" - [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) + # [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) $taskHttpClient = $null; try { Write-Verbose "Trying again to construct the HTTP client." - Write-Verbose "Trying with the external token" - $vstsAccessToken = $env:vstsAccessTok - Write-Verbose "Token : $vstsAccessToken" $federatedCredential = New-Object Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential($vstsAccessToken) @@ -1467,9 +1506,9 @@ function Get-AccessTokenMSALWithCustomScope { try { Get-MSALInstance $endpoint $connectedServiceNameARM - Write-Host "Get-MSALInstance completed" + Write-Verbose "Get-MSALInstance completed" } catch { - Write-Host "Get-MSALInstance failed with $_" + Write-Verobse "Get-MSALInstance failed with $_" } # prepare MSAL scopes diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 9f6ef8c39e06..8d4eac29950b 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -9,74 +9,67 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 -function StartNamedPiped($connectedServiceName) { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") +class ADOToken { - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() + [void] StartNamedPiped() { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() + Write-Verbose "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Verbose "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + + $response = $this.GetConnectedServiceNameAccessToken() + Write-Verbose "Received: $line" + Write-Verbose "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() } - # Close the pipe - $reader.Close() - $pipe.Close() -} - -class MyClass { - [string] GetConnectedServiceNameAccessToken() { - Set-PSDebug -Trace 1 - $DebugPreference = "Continue" - try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Host " ConnectionServiceName : ${connectedServiceName}" - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Verbose "No Service connection was found, returning the System Access Token" + return $(System.AccessToken); + } - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $vstsEndpoint"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + return $access_token - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - Write-Host $accessToken.token_type - Write-Host $accessToken.access_token - Write-Host $accessToken.expires_on - - return "Success" } catch { - Write-Host $_ - return "Failed" + Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" + return $(System.AccessToken) } } } @@ -109,38 +102,26 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" - $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require - $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken - $env:vstsAccessTok = $vstsAccessTok - # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - $myObject = [MyClass]::new() - + $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ param($obj) try { - $result = $obj.GetConnectedServiceNameAccessToken() + $result = $obj.StartNamedPiped() return $result } catch { return $_ } }).AddArgument($myObject) - - $a = [System.AppDomain]::CurrentDomain - Write-Host "[System.AppDomain]::CurrentDomain $a" $psRunspace.RunspacePool = $runspacePool - $asyncResult = $psRunspace.BeginInvoke() - $derivedValue = $psRunspace.EndInvoke($asyncResult) + $psRunspace.BeginInvoke() - # $myObject.GetConnectedServiceNameAccessToken() - - # Output the derived value - Write-Output "The derived value is: $derivedValue" + Write-Verbose "After invoking runspace" # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -243,36 +224,34 @@ try { ([System.Environment]::NewLine), $contents); - if (![string]::IsNullOrEmpty($connectedServiceName)) { - $joinedContents = ' + $joinedContents = ' - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-AzDoToken { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $input = "Get-AzDoToken" + $input = "Get-AzDoToken" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + } - - ' + $joinedContents; - } + catch { + Write-Host "Error in Get-AzDoToken: $_" + } + } + + ' + $joinedContents; Write-Host $joinedContents diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index eafcec31dbcf..4b8440e6237c 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 44 + "Patch": 86 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index ef7744fcdcd9..42b0109d7f96 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 44 + "Patch": 86 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 853fb81ff548..0e23a9f2b185 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.248.44 -Node20-225|2.248.45 +Default|2.248.86 +Node20-225|2.248.87 diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 9f6ef8c39e06..81db8982523a 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -9,74 +9,67 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 -function StartNamedPiped($connectedServiceName) { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") +class ADOToken { - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() + [void] StartNamedPiped() { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() + # Write-Verbose "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Verbose "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + + $response = $this.GetConnectedServiceNameAccessToken() + Write-Verbose "Received: $line" + Write-Verbose "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() } - # Close the pipe - $reader.Close() - $pipe.Close() -} - -class MyClass { - [string] GetConnectedServiceNameAccessToken() { - Set-PSDebug -Trace 1 - $DebugPreference = "Continue" - try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Host " ConnectionServiceName : ${connectedServiceName}" - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Verbose "No Service connection was found, returning the System Access Token" + return $(System.AccessToken); + } - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $vstsEndpoint"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + return $access_token - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - Write-Host $accessToken.token_type - Write-Host $accessToken.access_token - Write-Host $accessToken.expires_on - - return "Success" } catch { - Write-Host $_ - return "Failed" + Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" + return $(System.AccessToken) } } } @@ -109,38 +102,26 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" - $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require - $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken - $env:vstsAccessTok = $vstsAccessTok - # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - $myObject = [MyClass]::new() - + $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ param($obj) try { - $result = $obj.GetConnectedServiceNameAccessToken() + $result = $obj.StartNamedPiped() return $result } catch { return $_ } }).AddArgument($myObject) - - $a = [System.AppDomain]::CurrentDomain - Write-Host "[System.AppDomain]::CurrentDomain $a" $psRunspace.RunspacePool = $runspacePool - $asyncResult = $psRunspace.BeginInvoke() - $derivedValue = $psRunspace.EndInvoke($asyncResult) + $psRunspace.BeginInvoke() - # $myObject.GetConnectedServiceNameAccessToken() - - # Output the derived value - Write-Output "The derived value is: $derivedValue" + Write-Verbose "After invoking runspace" # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -243,36 +224,34 @@ try { ([System.Environment]::NewLine), $contents); - if (![string]::IsNullOrEmpty($connectedServiceName)) { - $joinedContents = ' + $joinedContents = ' - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-AzDoToken { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $input = "Get-AzDoToken" + $input = "Get-AzDoToken" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + } - - ' + $joinedContents; - } + catch { + Write-Host "Error in Get-AzDoToken: $_" + } + } + + ' + $joinedContents; Write-Host $joinedContents diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 7090e45af520..ab817e0a9a20 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 44 + "Patch": 86 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.44", - "Node20-225": "2.248.45" + "Default": "2.248.86", + "Node20-225": "2.248.87" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index 81c52da7e9a4..6eaa5f566bf8 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 44 + "Patch": 86 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.44", - "Node20-225": "2.248.45" + "Default": "2.248.86", + "Node20-225": "2.248.87" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 9f6ef8c39e06..81db8982523a 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -9,74 +9,67 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 -function StartNamedPiped($connectedServiceName) { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") +class ADOToken { - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() + [void] StartNamedPiped() { + # Create a named pipe with the specified security + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = Get-ConnectedServiceNameAccessToken -connectedServiceName $connectedServiceName - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() + # Write-Verbose "Waiting for a connection..." + $pipe.WaitForConnection() + + Write-Verbose "Client connected." + + # Read data from the pipe + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + + $response = $this.GetConnectedServiceNameAccessToken() + Write-Verbose "Received: $line" + Write-Verbose "Sending response: $response" + + # Send the response back to the client + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($response) + $writer.Flush() + } + + # Close the pipe + $reader.Close() + $pipe.Close() } - # Close the pipe - $reader.Close() - $pipe.Close() -} - -class MyClass { - [string] GetConnectedServiceNameAccessToken() { - Set-PSDebug -Trace 1 - $DebugPreference = "Continue" - try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Host " ConnectionServiceName : ${connectedServiceName}" - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Verbose "No Service connection was found, returning the System Access Token" + return $(System.AccessToken); + } - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $vstsEndpoint"; + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + return $access_token - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - Write-Host $accessToken.token_type - Write-Host $accessToken.access_token - Write-Host $accessToken.expires_on - - return "Success" } catch { - Write-Host $_ - return "Failed" + Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" + return $(System.AccessToken) } } } @@ -109,38 +102,26 @@ Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" - $vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require - $vstsAccessTok = $vstsEndpoint.auth.parameters.AccessToken - $env:vstsAccessTok = $vstsAccessTok - # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - $myObject = [MyClass]::new() - + $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ param($obj) try { - $result = $obj.GetConnectedServiceNameAccessToken() + $result = $obj.StartNamedPiped() return $result } catch { return $_ } }).AddArgument($myObject) - - $a = [System.AppDomain]::CurrentDomain - Write-Host "[System.AppDomain]::CurrentDomain $a" $psRunspace.RunspacePool = $runspacePool - $asyncResult = $psRunspace.BeginInvoke() - $derivedValue = $psRunspace.EndInvoke($asyncResult) + $psRunspace.BeginInvoke() - # $myObject.GetConnectedServiceNameAccessToken() - - # Output the derived value - Write-Output "The derived value is: $derivedValue" + Write-Verbose "After invoking runspace" # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -243,36 +224,34 @@ try { ([System.Environment]::NewLine), $contents); - if (![string]::IsNullOrEmpty($connectedServiceName)) { - $joinedContents = ' + $joinedContents = ' - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-AzDoToken { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + Write-Host "Connected to the server." + + function Get-AzDoToken { + try { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - $input = "Get-AzDoToken" + $input = "Get-AzDoToken" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + # Read response from the server + $response = $reader.ReadLine() + Write-Host "Server response: $response" + } - - ' + $joinedContents; - } + catch { + Write-Host "Error in Get-AzDoToken: $_" + } + } + + ' + $joinedContents; Write-Host $joinedContents diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index ac47160dd36d..c1179699f867 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 45 + "Patch": 87 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.44", - "Node20-225": "2.248.45" + "Default": "2.248.86", + "Node20-225": "2.248.87" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index 96c5abe88b4a..c92cf3c338fb 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 45 + "Patch": 87 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.44", - "Node20-225": "2.248.45" + "Default": "2.248.86", + "Node20-225": "2.248.87" } } \ No newline at end of file From 3ceafdd9833022c07a3c105acce5e3c40698fffd Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Tue, 12 Nov 2024 10:05:19 +0530 Subject: [PATCH 07/13] Windows flow for PowetshellV2 E2E working --- .../VstsAzureRestHelpers_.psm1 | 7 +- Tasks/PowerShellV2/powershell.ps1 | 68 +++++++++++++----- Tasks/PowerShellV2/task.json | 2 +- Tasks/PowerShellV2/task.loc.json | 2 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/powershell.ps1 | 72 ++++++++++++++----- _generated/PowerShellV2/task.json | 6 +- _generated/PowerShellV2/task.loc.json | 6 +- _generated/PowerShellV2_Node20/powershell.ps1 | 72 ++++++++++++++----- _generated/PowerShellV2_Node20/task.json | 6 +- _generated/PowerShellV2_Node20/task.loc.json | 6 +- 11 files changed, 180 insertions(+), 71 deletions(-) diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index 782b7fd27788..2c3ef5dc36cd 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -1368,13 +1368,18 @@ function Get-VstsFederatedTokenModified { [string]$vstsAccessToken ) + $uri = Get-VstsTaskVariable -Name 'System.CollectionUri' -Require $planId = Get-VstsTaskVariable -Name 'System.PlanId' -Require $jobId = Get-VstsTaskVariable -Name 'System.JobId' -Require $hub = Get-VstsTaskVariable -Name 'System.HostType' -Require $projectId = Get-VstsTaskVariable -Name 'System.TeamProjectId' -Require + Write-Host "URI $uri" + Write-Verbose "URI $uri" + + # Construct the API URL - $url = "https://dev.azure.com/prsinghal1/$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" + $url = $uri + "$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" Write-Verbose $url $headers = @{ diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 8d4eac29950b..fd6a432bf314 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -13,22 +13,45 @@ class ADOToken { [void] StartNamedPiped() { # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - Write-Verbose "Waiting for a connection..." + Write-Host "Waiting for a connection..." $pipe.WaitForConnection() - Write-Verbose "Client connected." + Write-Host "Client connected." # Read data from the pipe $reader = New-Object System.IO.StreamReader($pipe) while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} - $response = $this.GetConnectedServiceNameAccessToken() - Write-Verbose "Received: $line" - Write-Verbose "Sending response: $response" + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $response = $(System.AccessToken); + } + + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + $response = $access_token + + #$response = $this.GetConnectedServiceNameAccessToken() + + Write-Host "Sending response: $response" # Send the response back to the client $writer = New-Object System.IO.StreamWriter($pipe) @@ -37,6 +60,7 @@ class ADOToken { } # Close the pipe + Write-Host "Closing the pipe" $reader.Close() $pipe.Close() } @@ -44,8 +68,11 @@ class ADOToken { [string] GetConnectedServiceNameAccessToken() { try { - + Write-Verbose "Inside GetConnectedServiceNameAccessToken" + Write-Host "Inside GetConnectedServiceNameAccessToken" [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Verbose "Inside $connectedServiceName" + Write-Host "Inside $connectedServiceName" if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { Write-Verbose "No Service connection was found, returning the System Access Token" @@ -121,7 +148,7 @@ try { $psRunspace.RunspacePool = $runspacePool $psRunspace.BeginInvoke() - Write-Verbose "After invoking runspace" + Start-Sleep -Seconds 5 # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -225,9 +252,9 @@ try { $contents); $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." function Get-AzDoToken { @@ -236,25 +263,23 @@ try { $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) $input = "Get-AzDoToken" - + # Send command to the server $writer.WriteLine($input) $writer.Flush() - + # Read response from the server $response = $reader.ReadLine() Write-Host "Server response: $response" - } catch { Write-Host "Error in Get-AzDoToken: $_" + return $(System.AccessToken) } } ' + $joinedContents; - Write-Host $joinedContents - if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -268,6 +293,15 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } + $joinedContents = 'try { '+ $joinedContents + '} + finally { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $input = "Stop-Pipe" + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + }' + # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -322,7 +356,6 @@ try { $failed = $true $inError = $true $null = $errorLines.AppendLine("$($_.Exception.Message)") - # Write to verbose to mitigate if the process hangs. Write-Verbose "STDERR: $($_.Exception.Message)" } @@ -336,7 +369,6 @@ try { Write-VstsTaskError -Message $message -IssueSource $IssueSources.CustomerScript } } - Write-Host "$_" } } diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 4b8440e6237c..6288c2b599a4 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 86 + "Patch": 122 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 42b0109d7f96..fb092e159acf 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 86 + "Patch": 122 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 0e23a9f2b185..43898467d4b4 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.248.86 -Node20-225|2.248.87 +Default|2.248.122 +Node20-225|2.248.123 diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 81db8982523a..d4cdab8850b5 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -13,22 +13,45 @@ class ADOToken { [void] StartNamedPiped() { # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - # Write-Verbose "Waiting for a connection..." + Write-Host "Waiting for a connection..." $pipe.WaitForConnection() - Write-Verbose "Client connected." + Write-Host "Client connected." # Read data from the pipe $reader = New-Object System.IO.StreamReader($pipe) while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} - $response = $this.GetConnectedServiceNameAccessToken() - Write-Verbose "Received: $line" - Write-Verbose "Sending response: $response" + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $response = $(System.AccessToken); + } + + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + $response = $access_token + + #$response = $this.GetConnectedServiceNameAccessToken() + + Write-Host "Sending response: $response" # Send the response back to the client $writer = New-Object System.IO.StreamWriter($pipe) @@ -37,15 +60,21 @@ class ADOToken { } # Close the pipe + Write-Host "Closing the pipe" $reader.Close() $pipe.Close() } [string] GetConnectedServiceNameAccessToken() { + Set-PSDebug -Trace 1 + $DebugPreference = "Continue" try { - + Write-Verbose "Inside GetConnectedServiceNameAccessToken" + Write-Host "Inside GetConnectedServiceNameAccessToken" [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Verbose "Inside $connectedServiceName" + Write-Host "Inside $connectedServiceName" if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { Write-Verbose "No Service connection was found, returning the System Access Token" @@ -111,6 +140,7 @@ try { $psRunspace = [powershell]::Create().AddScript({ param($obj) try { + Set-PSDebug -Trace 1 $result = $obj.StartNamedPiped() return $result } catch { @@ -121,7 +151,7 @@ try { $psRunspace.RunspacePool = $runspacePool $psRunspace.BeginInvoke() - Write-Verbose "After invoking runspace" + Start-Sleep -Seconds 5 # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -225,9 +255,9 @@ try { $contents); $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." function Get-AzDoToken { @@ -236,25 +266,23 @@ try { $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) $input = "Get-AzDoToken" - + # Send command to the server $writer.WriteLine($input) $writer.Flush() - + # Read response from the server $response = $reader.ReadLine() Write-Host "Server response: $response" - } catch { Write-Host "Error in Get-AzDoToken: $_" + return $(System.AccessToken) } } ' + $joinedContents; - Write-Host $joinedContents - if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -268,6 +296,15 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } + $joinedContents = 'try { '+ $joinedContents + '} + finally { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $input = "Stop-Pipe" + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + }' + # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -307,6 +344,7 @@ try { $global:ErrorActionPreference = 'Continue' $failed = $false + Set-PSDebug -Trace 1 # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -322,7 +360,6 @@ try { $failed = $true $inError = $true $null = $errorLines.AppendLine("$($_.Exception.Message)") - # Write to verbose to mitigate if the process hangs. Write-Verbose "STDERR: $($_.Exception.Message)" } @@ -336,7 +373,6 @@ try { Write-VstsTaskError -Message $message -IssueSource $IssueSources.CustomerScript } } - Write-Host "$_" } } diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index ab817e0a9a20..48783f091b93 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 86 + "Patch": 122 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.86", - "Node20-225": "2.248.87" + "Default": "2.248.122", + "Node20-225": "2.248.123" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index 6eaa5f566bf8..d2d204c010ca 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 86 + "Patch": 122 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.86", - "Node20-225": "2.248.87" + "Default": "2.248.122", + "Node20-225": "2.248.123" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 81db8982523a..d4cdab8850b5 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -13,22 +13,45 @@ class ADOToken { [void] StartNamedPiped() { # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("praval1","InOut") + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - # Write-Verbose "Waiting for a connection..." + Write-Host "Waiting for a connection..." $pipe.WaitForConnection() - Write-Verbose "Client connected." + Write-Host "Client connected." # Read data from the pipe $reader = New-Object System.IO.StreamReader($pipe) while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} - $response = $this.GetConnectedServiceNameAccessToken() - Write-Verbose "Received: $line" - Write-Verbose "Sending response: $response" + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $response = $(System.AccessToken); + } + + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $access_token = $result.AccessToken + + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { + throw + } + + Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + $response = $access_token + + #$response = $this.GetConnectedServiceNameAccessToken() + + Write-Host "Sending response: $response" # Send the response back to the client $writer = New-Object System.IO.StreamWriter($pipe) @@ -37,15 +60,21 @@ class ADOToken { } # Close the pipe + Write-Host "Closing the pipe" $reader.Close() $pipe.Close() } [string] GetConnectedServiceNameAccessToken() { + Set-PSDebug -Trace 1 + $DebugPreference = "Continue" try { - + Write-Verbose "Inside GetConnectedServiceNameAccessToken" + Write-Host "Inside GetConnectedServiceNameAccessToken" [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + Write-Verbose "Inside $connectedServiceName" + Write-Host "Inside $connectedServiceName" if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { Write-Verbose "No Service connection was found, returning the System Access Token" @@ -111,6 +140,7 @@ try { $psRunspace = [powershell]::Create().AddScript({ param($obj) try { + Set-PSDebug -Trace 1 $result = $obj.StartNamedPiped() return $result } catch { @@ -121,7 +151,7 @@ try { $psRunspace.RunspacePool = $runspacePool $psRunspace.BeginInvoke() - Write-Verbose "After invoking runspace" + Start-Sleep -Seconds 5 # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -225,9 +255,9 @@ try { $contents); $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "praval1", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(5000) # Wait up to 5 seconds for the connection + + $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." function Get-AzDoToken { @@ -236,25 +266,23 @@ try { $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) $input = "Get-AzDoToken" - + # Send command to the server $writer.WriteLine($input) $writer.Flush() - + # Read response from the server $response = $reader.ReadLine() Write-Host "Server response: $response" - } catch { Write-Host "Error in Get-AzDoToken: $_" + return $(System.AccessToken) } } ' + $joinedContents; - Write-Host $joinedContents - if ($input_showWarnings) { $joinedContents = ' $warnings = New-Object System.Collections.ObjectModel.ObservableCollection[System.Management.Automation.WarningRecord]; @@ -268,6 +296,15 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } + $joinedContents = 'try { '+ $joinedContents + '} + finally { + $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) + $input = "Stop-Pipe" + # Send command to the server + $writer.WriteLine($input) + $writer.Flush() + }' + # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -307,6 +344,7 @@ try { $global:ErrorActionPreference = 'Continue' $failed = $false + Set-PSDebug -Trace 1 # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -322,7 +360,6 @@ try { $failed = $true $inError = $true $null = $errorLines.AppendLine("$($_.Exception.Message)") - # Write to verbose to mitigate if the process hangs. Write-Verbose "STDERR: $($_.Exception.Message)" } @@ -336,7 +373,6 @@ try { Write-VstsTaskError -Message $message -IssueSource $IssueSources.CustomerScript } } - Write-Host "$_" } } diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index c1179699f867..3870c6f4886b 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 87 + "Patch": 123 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.86", - "Node20-225": "2.248.87" + "Default": "2.248.122", + "Node20-225": "2.248.123" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index c92cf3c338fb..5d7c6202aa6a 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 87 + "Patch": 123 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.86", - "Node20-225": "2.248.87" + "Default": "2.248.122", + "Node20-225": "2.248.123" } } \ No newline at end of file From 0d4180f356f3e2a683e59f407a1b167677f7fa96 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Thu, 14 Nov 2024 13:58:07 +0530 Subject: [PATCH 08/13] Windows flow completed --- Tasks/PowerShellV2/powershell.ps1 | 34 +++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index fd6a432bf314..aca87d22cbe4 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -5,10 +5,14 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ + +# Install-Module -Name "Az.Accounts" -PassThru -Force +# Import-Module Az.Accounts . $PSScriptRoot\helpers.ps1 + class ADOToken { [void] StartNamedPiped() { @@ -42,16 +46,30 @@ class ADOToken { $access_token = $result.AccessToken + $response = $access_token + if ($null -eq $access_token -or $access_token -eq [string]::Empty) { throw } - Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" - $response = $access_token + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + + # Set-PSDebug -Trace 1 + + # $tenantId = $vstsEndpoint.Auth.Parameters.TenantId + # $accountId = $vstsEndpoint.Auth.Parameters.ServicePrincipalId + # Write-Host "-AccessToken $access_token -Tenant $tenantId -AccountId $accountId" - #$response = $this.GetConnectedServiceNameAccessToken() - Write-Host "Sending response: $response" + + # Enable-AzContextAutoSave -Scope Process + # Connect-AzAccount -AccessToken $access_token -Tenant $tenantId -AccountId $accountId -ErrorAction Stop + + # $AdoApiToken = Get-AzAccessToken -ResourceUrl "499b84ac-1321-427f-aa17-267ca6975798" + + # $response = $AdoApiToken + + # Write-Host "Sending response: $AdoApiToken" # Send the response back to the client $writer = New-Object System.IO.StreamWriter($pipe) @@ -91,7 +109,10 @@ class ADOToken { throw } - Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" + Write-Verbose "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + + + return $access_token } catch { @@ -254,6 +275,7 @@ try { $joinedContents = ' $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + Write-Host "Trying connect to the server." $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." From 7ded88c25aa7a487671ae92dc5dd3160159803c7 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Thu, 14 Nov 2024 13:59:39 +0530 Subject: [PATCH 09/13] Windows flow --- .../VstsAzureRestHelpers_.psm1 | 74 ++++---- Tasks/PowerShellV2/powershell.ps1 | 162 +++++++----------- Tasks/PowerShellV2/task.json | 4 +- Tasks/PowerShellV2/task.loc.json | 4 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/powershell.ps1 | 148 +++++++--------- _generated/PowerShellV2/task.json | 8 +- _generated/PowerShellV2/task.loc.json | 8 +- _generated/PowerShellV2_Node20/powershell.ps1 | 148 +++++++--------- _generated/PowerShellV2_Node20/task.json | 8 +- _generated/PowerShellV2_Node20/task.loc.json | 8 +- 11 files changed, 240 insertions(+), 336 deletions(-) diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index 2c3ef5dc36cd..afd0d52ea10c 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -1416,44 +1416,44 @@ function Get-VstsFederatedToken { $OMDirectory = $PSScriptRoot - # $newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll") - # if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) { - # Write-Verbose "$newtonsoftDll not found." - # throw - # } - # Write-Verbose "newtonsoftDll ${newtonsoftDll}" - # $jsAssembly = [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) - - # $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") - # Write-Verbose "vsServiceDll ${vsServicesDll}" - - # if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { - # Write-Verbose "$vsServicesDll not found." - # throw - # } - - # try { - # Add-Type -LiteralPath $vsServicesDll - # } catch { - # # The requested type may successfully load now even though the assembly itself is not fully loaded. - # Write-Verbose "$($_.Exception.GetType().FullName): $($_.Exception.Message)" - # } - - # $onAssemblyResolve = [System.ResolveEventHandler] { - # param($sender, $e) - - # if ($e.Name -like 'Newtonsoft.Json, *') { - # return $Global:jsAssembly - # } - - # Write-Verbose "Unable to resolve assembly name '$($e.Name)'" - # return $null - # } - - # $a = [System.AppDomain]::CurrentDomain - # Write-Host "[System.AppDomain]::CurrentDomain $a" + $newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll") + if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) { + Write-Verbose "$newtonsoftDll not found." + throw + } + Write-Verbose "newtonsoftDll ${newtonsoftDll}" + $jsAssembly = [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) + + $vsServicesDll = [System.IO.Path]::Combine($OMDirectory, "Microsoft.VisualStudio.Services.WebApi.dll") + Write-Verbose "vsServiceDll ${vsServicesDll}" + + if (!(Test-Path -LiteralPath $vsServicesDll -PathType Leaf)) { + Write-Verbose "$vsServicesDll not found." + throw + } + + try { + Add-Type -LiteralPath $vsServicesDll + } catch { + # The requested type may successfully load now even though the assembly itself is not fully loaded. + Write-Verbose "$($_.Exception.GetType().FullName): $($_.Exception.Message)" + } + + $onAssemblyResolve = [System.ResolveEventHandler] { + param($sender, $e) + + if ($e.Name -like 'Newtonsoft.Json, *') { + return $Global:jsAssembly + } + + Write-Verbose "Unable to resolve assembly name '$($e.Name)'" + return $null + } + + $a = [System.AppDomain]::CurrentDomain + Write-Host "[System.AppDomain]::CurrentDomain $a" - # [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) + [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) $taskHttpClient = $null; diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index aca87d22cbe4..b2658aab6cae 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -7,117 +7,62 @@ Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk Import-Module $PSScriptRoot\ps_modules\TlsHelper_ -# Install-Module -Name "Az.Accounts" -PassThru -Force -# Import-Module Az.Accounts - . $PSScriptRoot\helpers.ps1 - class ADOToken { [void] StartNamedPiped() { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $response = $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $access_token = $result.AccessToken - - $response = $access_token - - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw - } - - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - - # Set-PSDebug -Trace 1 - - # $tenantId = $vstsEndpoint.Auth.Parameters.TenantId - # $accountId = $vstsEndpoint.Auth.Parameters.ServicePrincipalId - # Write-Host "-AccessToken $access_token -Tenant $tenantId -AccountId $accountId" + try + { + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") + $global:waitForPipe = $false - - # Enable-AzContextAutoSave -Scope Process - # Connect-AzAccount -AccessToken $access_token -Tenant $tenantId -AccountId $accountId -ErrorAction Stop - - # $AdoApiToken = Get-AzAccessToken -ResourceUrl "499b84ac-1321-427f-aa17-267ca6975798" - - # $response = $AdoApiToken - - # Write-Host "Sending response: $AdoApiToken" + Write-Host "Pipe Waiting for a connection..." + $pipe.WaitForConnection() + Write-Host "Client connected." + + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() - } - - # Close the pipe - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } - - [string] GetConnectedServiceNameAccessToken() - { - try { - Write-Verbose "Inside GetConnectedServiceNameAccessToken" - Write-Host "Inside GetConnectedServiceNameAccessToken" - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Verbose "Inside $connectedServiceName" - Write-Host "Inside $connectedServiceName" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Verbose "No Service connection was found, returning the System Access Token" - return $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $token = "" + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = "$(System.AccessToken)"; + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + } - $access_token = $result.AccessToken + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = "$(System.AccessToken)"; + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - Write-Verbose "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - - - - return $access_token - + + Write-Host "Closing the pipe" + $reader.Close() + $pipe.Close() } catch { - Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" - return $(System.AccessToken) + Write-Host "Something went wrong $_" } } } @@ -153,6 +98,8 @@ try { # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + + $global:waitForPipe = $true $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool @@ -167,9 +114,15 @@ try { }).AddArgument($myObject) $psRunspace.RunspacePool = $runspacePool + Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - Start-Sleep -Seconds 5 + while($global:waitForPipe) { + Write-Host "Waiting for the pipe to start......." + Start-Sleep -Seconds 1 + } + Start-Sleep -Seconds 1 + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -290,13 +243,12 @@ try { $writer.WriteLine($input) $writer.Flush() - # Read response from the server $response = $reader.ReadLine() - Write-Host "Server response: $response" + return $response } catch { Write-Host "Error in Get-AzDoToken: $_" - return $(System.AccessToken) + return "$(System.AccessToken)" } } @@ -429,5 +381,9 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { + # Clean up runspace resources + $psRunspace.Dispose() + $runspacePool.Close() + $runspacePool.Dispose() Trace-VstsLeavingInvocation $MyInvocation } diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 6288c2b599a4..00d9cc77684c 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 122 + "Patch": 220 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "Azure Resource Manager connection", "defaultValue": "", "helpMarkDown": "Select an Azure Resource Manager service connection" diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index fb092e159acf..910fe63fa6d8 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 122 + "Patch": 220 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "Azure Resource Manager connection", "defaultValue": "", "helpMarkDown": "Select an Azure Resource Manager service connection" diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 43898467d4b4..ffd2f6936f5d 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.248.122 -Node20-225|2.248.123 +Default|2.248.220 +Node20-225|2.248.221 diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index d4cdab8850b5..b2658aab6cae 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -5,100 +5,64 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 class ADOToken { [void] StartNamedPiped() { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") + try + { + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $response = $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $access_token = $result.AccessToken - - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw - } - - Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" - $response = $access_token - - #$response = $this.GetConnectedServiceNameAccessToken() + $global:waitForPipe = $false - Write-Host "Sending response: $response" + Write-Host "Pipe Waiting for a connection..." + $pipe.WaitForConnection() + Write-Host "Client connected." + + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() - } - - # Close the pipe - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } - - [string] GetConnectedServiceNameAccessToken() - { - Set-PSDebug -Trace 1 - $DebugPreference = "Continue" - try { - Write-Verbose "Inside GetConnectedServiceNameAccessToken" - Write-Host "Inside GetConnectedServiceNameAccessToken" - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Verbose "Inside $connectedServiceName" - Write-Host "Inside $connectedServiceName" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Verbose "No Service connection was found, returning the System Access Token" - return $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $token = "" + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = "$(System.AccessToken)"; + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + } - $access_token = $result.AccessToken + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = "$(System.AccessToken)"; + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" - return $access_token - + + Write-Host "Closing the pipe" + $reader.Close() + $pipe.Close() } catch { - Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" - return $(System.AccessToken) + Write-Host "Something went wrong $_" } } } @@ -134,13 +98,14 @@ try { # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + + $global:waitForPipe = $true $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ param($obj) try { - Set-PSDebug -Trace 1 $result = $obj.StartNamedPiped() return $result } catch { @@ -149,9 +114,15 @@ try { }).AddArgument($myObject) $psRunspace.RunspacePool = $runspacePool + Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - Start-Sleep -Seconds 5 + while($global:waitForPipe) { + Write-Host "Waiting for the pipe to start......." + Start-Sleep -Seconds 1 + } + Start-Sleep -Seconds 1 + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -257,6 +228,7 @@ try { $joinedContents = ' $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + Write-Host "Trying connect to the server." $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." @@ -271,13 +243,12 @@ try { $writer.WriteLine($input) $writer.Flush() - # Read response from the server $response = $reader.ReadLine() - Write-Host "Server response: $response" + return $response } catch { Write-Host "Error in Get-AzDoToken: $_" - return $(System.AccessToken) + return "$(System.AccessToken)" } } @@ -344,7 +315,6 @@ try { $global:ErrorActionPreference = 'Continue' $failed = $false - Set-PSDebug -Trace 1 # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -411,5 +381,9 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { + # Clean up runspace resources + $psRunspace.Dispose() + $runspacePool.Close() + $runspacePool.Dispose() Trace-VstsLeavingInvocation $MyInvocation } diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 48783f091b93..4abe72abad36 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 122 + "Patch": 220 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "Azure Resource Manager connection", "defaultValue": "", "helpMarkDown": "Select an Azure Resource Manager service connection" @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.122", - "Node20-225": "2.248.123" + "Default": "2.248.220", + "Node20-225": "2.248.221" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index d2d204c010ca..974b2cda311d 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 122 + "Patch": 220 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "ms-resource:loc.input.label.ConnectedServiceName", "defaultValue": "", "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceName" @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.122", - "Node20-225": "2.248.123" + "Default": "2.248.220", + "Node20-225": "2.248.221" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index d4cdab8850b5..b2658aab6cae 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -5,100 +5,64 @@ Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 class ADOToken { [void] StartNamedPiped() { - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") + try + { + $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $response = $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $access_token = $result.AccessToken - - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw - } - - Write-Host "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" - $response = $access_token - - #$response = $this.GetConnectedServiceNameAccessToken() + $global:waitForPipe = $false - Write-Host "Sending response: $response" + Write-Host "Pipe Waiting for a connection..." + $pipe.WaitForConnection() + Write-Host "Client connected." + + $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { + $line = $reader.ReadLine() + if ($null -eq $line) { break } + if($line -eq "Stop-Pipe") {break} + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($response) - $writer.Flush() - } - - # Close the pipe - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } - - [string] GetConnectedServiceNameAccessToken() - { - Set-PSDebug -Trace 1 - $DebugPreference = "Continue" - try { - Write-Verbose "Inside GetConnectedServiceNameAccessToken" - Write-Host "Inside GetConnectedServiceNameAccessToken" - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - Write-Verbose "Inside $connectedServiceName" - Write-Host "Inside $connectedServiceName" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Verbose "No Service connection was found, returning the System Access Token" - return $(System.AccessToken); - } - - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" + $token = "" + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = "$(System.AccessToken)"; + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + } - $access_token = $result.AccessToken + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = "$(System.AccessToken)"; + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } - if ($null -eq $access_token -or $access_token -eq [string]::Empty) { - throw + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - Write-Verbose "Successfully generated the ADO Access token for Service Connection : $connectedServiceName" - return $access_token - + + Write-Host "Closing the pipe" + $reader.Close() + $pipe.Close() } catch { - Write-Verbose "Failed to create ADO access token with message $_, returning the System Access Token" - return $(System.AccessToken) + Write-Host "Something went wrong $_" } } } @@ -134,13 +98,14 @@ try { # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + + $global:waitForPipe = $true $myObject = [ADOToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ param($obj) try { - Set-PSDebug -Trace 1 $result = $obj.StartNamedPiped() return $result } catch { @@ -149,9 +114,15 @@ try { }).AddArgument($myObject) $psRunspace.RunspacePool = $runspacePool + Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - Start-Sleep -Seconds 5 + while($global:waitForPipe) { + Write-Host "Waiting for the pipe to start......." + Start-Sleep -Seconds 1 + } + Start-Sleep -Seconds 1 + # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' @@ -257,6 +228,7 @@ try { $joinedContents = ' $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) + Write-Host "Trying connect to the server." $AzDoTokenPipe.Connect(10000) Write-Host "Connected to the server." @@ -271,13 +243,12 @@ try { $writer.WriteLine($input) $writer.Flush() - # Read response from the server $response = $reader.ReadLine() - Write-Host "Server response: $response" + return $response } catch { Write-Host "Error in Get-AzDoToken: $_" - return $(System.AccessToken) + return "$(System.AccessToken)" } } @@ -344,7 +315,6 @@ try { $global:ErrorActionPreference = 'Continue' $failed = $false - Set-PSDebug -Trace 1 # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -411,5 +381,9 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { + # Clean up runspace resources + $psRunspace.Dispose() + $runspacePool.Close() + $runspacePool.Dispose() Trace-VstsLeavingInvocation $MyInvocation } diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index 3870c6f4886b..9f05574eacc2 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 123 + "Patch": 221 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "Azure Resource Manager connection", "defaultValue": "", "helpMarkDown": "Select an Azure Resource Manager service connection" @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.122", - "Node20-225": "2.248.123" + "Default": "2.248.220", + "Node20-225": "2.248.221" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index 5d7c6202aa6a..1940ad00b3b8 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 248, - "Patch": 123 + "Patch": 221 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -41,7 +41,7 @@ "aliases": [ "azureSubscription" ], - "type": "connectedService:AzureRM", + "type": "connectedService:workloadidentityuser", "label": "ms-resource:loc.input.label.ConnectedServiceName", "defaultValue": "", "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceName" @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.122", - "Node20-225": "2.248.123" + "Default": "2.248.220", + "Node20-225": "2.248.221" } } \ No newline at end of file From d69a7b591844b3d5ce7fa6deb590d6b518e13981 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Tue, 19 Nov 2024 16:35:51 +0530 Subject: [PATCH 10/13] Tested --- Tasks/PowerShellV2/Auth.ts | 85 ------ Tasks/PowerShellV2/package-lock.json | 14 +- Tasks/PowerShellV2/powershell.ps1 | 70 ++--- Tasks/PowerShellV2/powershell.ts | 258 +++++++----------- Tasks/PowerShellV2/task.json | 10 +- Tasks/PowerShellV2/task.loc.json | 10 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/Auth.ts | 85 ------ .../resources.resjson/en-US/resources.resjson | 4 +- _generated/PowerShellV2/package-lock.json | 14 +- _generated/PowerShellV2/powershell.ps1 | 70 ++--- _generated/PowerShellV2/powershell.ts | 258 +++++++----------- _generated/PowerShellV2/task.json | 14 +- _generated/PowerShellV2/task.loc.json | 10 +- _generated/PowerShellV2_Node20/Auth.ts | 85 ------ .../resources.resjson/en-US/resources.resjson | 4 +- _generated/PowerShellV2_Node20/powershell.ps1 | 70 ++--- _generated/PowerShellV2_Node20/powershell.ts | 258 +++++++----------- _generated/PowerShellV2_Node20/task.json | 14 +- _generated/PowerShellV2_Node20/task.loc.json | 10 +- 20 files changed, 471 insertions(+), 876 deletions(-) delete mode 100644 Tasks/PowerShellV2/Auth.ts delete mode 100644 _generated/PowerShellV2/Auth.ts delete mode 100644 _generated/PowerShellV2_Node20/Auth.ts diff --git a/Tasks/PowerShellV2/Auth.ts b/Tasks/PowerShellV2/Auth.ts deleted file mode 100644 index 810a37507a91..000000000000 --- a/Tasks/PowerShellV2/Auth.ts +++ /dev/null @@ -1,85 +0,0 @@ -import * as tl from "azure-pipelines-task-lib/task"; -import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; - -const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); -if(nodeVersion < 16) { - tl.error(tl.loc('NodeVersionSupport', nodeVersion)); -} - -import * as msal from "@azure/msal-node"; -import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; - -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { - - // workloadidentityfederation - const authorizationScheme = tl - .getEndpointAuthorizationSchemeRequired(connectedService) - .toLowerCase(); - - // get token using workload identity federation or managed service identity - if (authorizationScheme !== "workloadidentityfederation") { - throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); - } - - // use azure devops webapi to get federated token using service connection - var servicePrincipalId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); - - var servicePrincipalTenantId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); - - const authorityUrl = - tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; - - tl.debug(`Getting federated token for service connection ${connectedService}`); - - var federatedToken: string = await getFederatedToken(connectedService); - - tl.debug(`Got federated token for service connection ${connectedService}`); - - // exchange federated token for service principal token (below) - return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); -} - -async function getAccessTokenFromFederatedToken( - servicePrincipalId: string, - servicePrincipalTenantId: string, - federatedToken: string, - authorityUrl: string -): Promise { - const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; - - // use msal to get access token using service principal with federated token - tl.debug(`Using authority url: ${authorityUrl}`); - tl.debug(`Using resource: ${AzureDevOpsResourceId}`); - - const config: msal.Configuration = { - auth: { - clientId: servicePrincipalId, - authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, - clientAssertion: federatedToken, - }, - system: { - loggerOptions: { - loggerCallback: (level, message, containsPii) => { - tl.debug(message); - }, - piiLoggingEnabled: false, - logLevel: msal.LogLevel.Verbose, - }, - }, - }; - - const app = new msal.ConfidentialClientApplication(config); - - const request: msal.ClientCredentialRequest = { - scopes: [`${AzureDevOpsResourceId}/.default`], - skipCache: true, - }; - - const result = await app.acquireTokenByClientCredential(request); - - tl.debug(`Got access token for service principal ${servicePrincipalId}`); - - return result?.accessToken; -} \ No newline at end of file diff --git a/Tasks/PowerShellV2/package-lock.json b/Tasks/PowerShellV2/package-lock.json index 6e0853b65dbf..b3a12c13e3c0 100644 --- a/Tasks/PowerShellV2/package-lock.json +++ b/Tasks/PowerShellV2/package-lock.json @@ -995,19 +995,19 @@ } }, "msal-node2": { - "version": "npm:@azure/msal-node@2.14.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", - "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "version": "npm:@azure/msal-node@2.16.1", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.1.tgz", + "integrity": "sha512-1NEFpTmMMT2A7RnZuvRl/hUmJU+GLPjh+ShyIqPktG2PvSd2yvPnzGd/BxIBAAvJG5nr9lH4oYcQXepDbaE7fg==", "requires": { - "@azure/msal-common": "14.15.0", + "@azure/msal-common": "14.16.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "dependencies": { "@azure/msal-common": { - "version": "14.15.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", - "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + "version": "14.16.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz", + "integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==" }, "uuid": { "version": "8.3.2", diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index b2658aab6cae..829cab8ed240 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -9,13 +9,12 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + class ADOToken { [void] StartNamedPiped() { - try - { $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false Write-Host "Pipe Waiting for a connection..." @@ -23,47 +22,54 @@ class ADOToken { Write-Host "Client connected." $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } if($line -eq "Stop-Pipe") {break} - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - $token = "" - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = "$(System.AccessToken)"; - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken + $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } } - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = "$(System.AccessToken)"; - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + catch { + Write-Host "Failed to generate token with message $_, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } finally { + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() } Write-Host "Closing the pipe" $reader.Close() $pipe.Close() - } catch { - Write-Host "Something went wrong $_" - } } } @@ -248,7 +254,7 @@ try { } catch { Write-Host "Error in Get-AzDoToken: $_" - return "$(System.AccessToken)" + return $global:SystemAccessTokenPowershellV2 } } diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 06191ff10ad1..79f4a1ed1760 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -7,12 +7,65 @@ import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; var uuidV4 = require('uuid/v4'); -const { exec } = require('child_process'); import * as msal from "@azure/msal-node"; import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; -import * as net from 'net'; +import { spawnSync } from 'child_process'; -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { +const ts2PsPipePath = '/tmp/ts2ps'; +const ps2TsPipePath = '/tmp/ps2ts'; + +spawnSync('mkfifo', [ts2PsPipePath]); +spawnSync('mkfifo', [ps2TsPipePath]) + +process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); + +async function startNamedPiped() { + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + const pipeStream = fs.createReadStream(ps2TsPipePath); + const writeStream = fs.createWriteStream(ts2PsPipePath); + + pipeStream.on('data', async (data) => { + const trimmedData = data.toString('utf8').trim(); + console.log(`Received from PowerShell: ${trimmedData}`); + var systemAccessToken = tl.getVariable('System.AccessToken'); + process.env.System_Access_Token_PSV2_Task = systemAccessToken; + + if (trimmedData == 'Get-AzDoToken') { + try { + if(connectedServiceName && connectedServiceName.trim().length > 0) { + const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); + console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + writeStream.write(token + "\n"); + } else { + console.log(`No Service Connection found, returning empty token`); + writeStream.write(systemAccessToken + "\n"); + } + } catch(err) { + console.log(`Token generation failed with error message ${err.message}`); + writeStream.write(systemAccessToken + "\n"); + } + } else { + console.log('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } + }); + + + pipeStream.on('error', (err) => { + console.error('Error with pipe stream:', err); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + }); +} + +async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { // workloadidentityfederation const authorizationScheme = tl @@ -97,134 +150,11 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -async function startNamedPiped(pipeName: string, connectedService: string) { - const content = ` - - # Create a security descriptor to allow Everyone to access the pipe - $pipePath = "/tmp/$pipeName" - - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") - - # Set permissions using chmod - # bash -c "chmod 777 $pipePath" - - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force - - $connectedServiceName = "${connectedService}" - - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - Write-Host "Hey" - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = $line - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } - - try { - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $endpoint"; - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() - - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - } catch { - Write-Host $_ - } - - - Write-Host $accessToken; - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($accessToken) - $writer.Flush() - } - - # Close the pipe - $reader.Close() - $pipe.Close() - `; - - // Spawn the PowerShell process - let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - - powershell.arg('-Command').arg(content); - - let options = { - failOnStdErr: false, - errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out - outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. - ignoreReturnCode: true - }; - - // Execute the PowerShell command and capture the output - const result = await powershell.exec(options); - - // Check the result and set the task result - if (result === 0) { - tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); - } else { - tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); - } - - // Handle PowerShell exit - powershell.on('close', (code) => { - console.log(`PowerShell process exited with code ${code}`); - }); - - return powershell; -} - -function findPowerShellPath(): Promise { - return new Promise((resolve, reject) => { - const command = 'which pwsh'; - - exec(command, (error, stdout, stderr) => { - if (error) { - console.error(`Error finding PowerShell: ${stderr}`); - resolve(null); - } else { - resolve(stdout.trim()); - } - }); - }); -} - async function run() { try { - // Get inputs. - - const connectedServiceName = tl.getInput("ConnectedServiceName", false); - console.log("connectedServiceName: " + connectedServiceName); - // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - - let pipe_name : string = "praval"; - startNamedPiped(pipe_name, connectedServiceName); + // Get inputs + startNamedPiped(); let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -303,37 +233,35 @@ async function run() { script = `${input_script}`; } - if (connectedServiceName && connectedServiceName.trim().length > 0) { - script = ` + script = ` + # Open the FIFO for writing + + $pipeWriter = [System.IO.StreamWriter]::new('${ps2TsPipePath}') + $pipeReader = [System.IO.StreamReader]::new('${ts2PsPipePath}') - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-Token { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - - $input = "Input" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + function Get-AzDoToken { + try { + $pipeWriter.WriteLine('Get-AzDoToken') + $pipeWriter.Flush() + + $token = $pipeReader.ReadLine() + $token = $token.Trim() + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "empty response was found, returning the System Access Token" + $token = $env:System_Access_Token_PSV2_Task + } + return $token + } + catch { + Write-Host "Error in Get-AzDoToken: $_" + $token = $env:System_Access_Token_PSV2_Task + return $token } + } - ${script} - `; - } + ${script} + `; if (input_showWarnings) { script = ` @@ -350,11 +278,23 @@ async function run() { `; } - tl.debug(script); + script = ` + try { + ${script} + } + finally { + # Close the streams + $pipeWriter.WriteLine('Close') + $pipeWriter.Flush() + $pipeWriter.Close() + $pipeReader.Close() + }` contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); + + console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); @@ -428,6 +368,10 @@ async function run() { } catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); + } finally { + const pipeStream = fs.createWriteStream(ps2TsPipePath); + pipeStream.write('Close'); + pipeStream.close(); } } diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 00d9cc77684c..87f1c28f6453 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 220 + "Minor": 249, + "Patch": 64 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -39,12 +39,12 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", - "label": "Azure Resource Manager connection", + "label": "Azure DevOps Service Connection", "defaultValue": "", - "helpMarkDown": "Select an Azure Resource Manager service connection" + "helpMarkDown": "Select an Azure DevOps Service Connection service connection" }, { "name": "targetType", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 910fe63fa6d8..31acd0224949 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 220 + "Minor": 249, + "Patch": 64 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -39,12 +39,12 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", - "label": "Azure Resource Manager connection", + "label": "Azure DevOps Service Connection", "defaultValue": "", - "helpMarkDown": "Select an Azure Resource Manager service connection" + "helpMarkDown": "Select an Azure DevOps Service Connection service connection" }, { "name": "targetType", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index ffd2f6936f5d..08f4efbca8c1 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.248.220 -Node20-225|2.248.221 +Default|2.249.64 +Node20-225|2.249.65 diff --git a/_generated/PowerShellV2/Auth.ts b/_generated/PowerShellV2/Auth.ts deleted file mode 100644 index 810a37507a91..000000000000 --- a/_generated/PowerShellV2/Auth.ts +++ /dev/null @@ -1,85 +0,0 @@ -import * as tl from "azure-pipelines-task-lib/task"; -import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; - -const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); -if(nodeVersion < 16) { - tl.error(tl.loc('NodeVersionSupport', nodeVersion)); -} - -import * as msal from "@azure/msal-node"; -import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; - -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { - - // workloadidentityfederation - const authorizationScheme = tl - .getEndpointAuthorizationSchemeRequired(connectedService) - .toLowerCase(); - - // get token using workload identity federation or managed service identity - if (authorizationScheme !== "workloadidentityfederation") { - throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); - } - - // use azure devops webapi to get federated token using service connection - var servicePrincipalId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); - - var servicePrincipalTenantId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); - - const authorityUrl = - tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; - - tl.debug(`Getting federated token for service connection ${connectedService}`); - - var federatedToken: string = await getFederatedToken(connectedService); - - tl.debug(`Got federated token for service connection ${connectedService}`); - - // exchange federated token for service principal token (below) - return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); -} - -async function getAccessTokenFromFederatedToken( - servicePrincipalId: string, - servicePrincipalTenantId: string, - federatedToken: string, - authorityUrl: string -): Promise { - const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; - - // use msal to get access token using service principal with federated token - tl.debug(`Using authority url: ${authorityUrl}`); - tl.debug(`Using resource: ${AzureDevOpsResourceId}`); - - const config: msal.Configuration = { - auth: { - clientId: servicePrincipalId, - authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, - clientAssertion: federatedToken, - }, - system: { - loggerOptions: { - loggerCallback: (level, message, containsPii) => { - tl.debug(message); - }, - piiLoggingEnabled: false, - logLevel: msal.LogLevel.Verbose, - }, - }, - }; - - const app = new msal.ConfidentialClientApplication(config); - - const request: msal.ClientCredentialRequest = { - scopes: [`${AzureDevOpsResourceId}/.default`], - skipCache: true, - }; - - const result = await app.acquireTokenByClientCredential(request); - - tl.debug(`Got access token for service principal ${servicePrincipalId}`); - - return result?.accessToken; -} \ No newline at end of file diff --git a/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson b/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson index 53f60e992ef3..d7810c1fb145 100644 --- a/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/PowerShellV2/Strings/resources.resjson/en-US/resources.resjson @@ -6,8 +6,8 @@ "loc.releaseNotes": "Script task consistency. Added support for macOS and Linux.", "loc.group.displayName.preferenceVariables": "Preference Variables", "loc.group.displayName.advanced": "Advanced", - "loc.input.label.ConnectedServiceName": "Azure Resource Manager connection", - "loc.input.help.ConnectedServiceName": "Select an Azure Resource Manager service connection", + "loc.input.label.ConnectedServiceName": "Azure DevOps Service Connection", + "loc.input.help.ConnectedServiceName": "Select an Azure DevOps Service Connection service connection", "loc.input.label.targetType": "Type", "loc.input.help.targetType": "Target script type: File Path or Inline", "loc.input.label.filePath": "Script Path", diff --git a/_generated/PowerShellV2/package-lock.json b/_generated/PowerShellV2/package-lock.json index 6e0853b65dbf..b3a12c13e3c0 100644 --- a/_generated/PowerShellV2/package-lock.json +++ b/_generated/PowerShellV2/package-lock.json @@ -995,19 +995,19 @@ } }, "msal-node2": { - "version": "npm:@azure/msal-node@2.14.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", - "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "version": "npm:@azure/msal-node@2.16.1", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.1.tgz", + "integrity": "sha512-1NEFpTmMMT2A7RnZuvRl/hUmJU+GLPjh+ShyIqPktG2PvSd2yvPnzGd/BxIBAAvJG5nr9lH4oYcQXepDbaE7fg==", "requires": { - "@azure/msal-common": "14.15.0", + "@azure/msal-common": "14.16.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "dependencies": { "@azure/msal-common": { - "version": "14.15.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", - "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + "version": "14.16.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.16.0.tgz", + "integrity": "sha512-1KOZj9IpcDSwpNiQNjt0jDYZpQvNZay7QAEi/5DLubay40iGYtLzya/jbjRPLyOTZhEKyL1MzPuw2HqBCjceYA==" }, "uuid": { "version": "8.3.2", diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index b2658aab6cae..829cab8ed240 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -9,13 +9,12 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + class ADOToken { [void] StartNamedPiped() { - try - { $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false Write-Host "Pipe Waiting for a connection..." @@ -23,47 +22,54 @@ class ADOToken { Write-Host "Client connected." $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } if($line -eq "Stop-Pipe") {break} - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - $token = "" - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = "$(System.AccessToken)"; - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken + $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } } - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = "$(System.AccessToken)"; - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + catch { + Write-Host "Failed to generate token with message $_, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } finally { + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() } Write-Host "Closing the pipe" $reader.Close() $pipe.Close() - } catch { - Write-Host "Something went wrong $_" - } } } @@ -248,7 +254,7 @@ try { } catch { Write-Host "Error in Get-AzDoToken: $_" - return "$(System.AccessToken)" + return $global:SystemAccessTokenPowershellV2 } } diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index 06191ff10ad1..79f4a1ed1760 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -7,12 +7,65 @@ import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; var uuidV4 = require('uuid/v4'); -const { exec } = require('child_process'); import * as msal from "@azure/msal-node"; import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; -import * as net from 'net'; +import { spawnSync } from 'child_process'; -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { +const ts2PsPipePath = '/tmp/ts2ps'; +const ps2TsPipePath = '/tmp/ps2ts'; + +spawnSync('mkfifo', [ts2PsPipePath]); +spawnSync('mkfifo', [ps2TsPipePath]) + +process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); + +async function startNamedPiped() { + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + const pipeStream = fs.createReadStream(ps2TsPipePath); + const writeStream = fs.createWriteStream(ts2PsPipePath); + + pipeStream.on('data', async (data) => { + const trimmedData = data.toString('utf8').trim(); + console.log(`Received from PowerShell: ${trimmedData}`); + var systemAccessToken = tl.getVariable('System.AccessToken'); + process.env.System_Access_Token_PSV2_Task = systemAccessToken; + + if (trimmedData == 'Get-AzDoToken') { + try { + if(connectedServiceName && connectedServiceName.trim().length > 0) { + const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); + console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + writeStream.write(token + "\n"); + } else { + console.log(`No Service Connection found, returning empty token`); + writeStream.write(systemAccessToken + "\n"); + } + } catch(err) { + console.log(`Token generation failed with error message ${err.message}`); + writeStream.write(systemAccessToken + "\n"); + } + } else { + console.log('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } + }); + + + pipeStream.on('error', (err) => { + console.error('Error with pipe stream:', err); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + }); +} + +async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { // workloadidentityfederation const authorizationScheme = tl @@ -97,134 +150,11 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -async function startNamedPiped(pipeName: string, connectedService: string) { - const content = ` - - # Create a security descriptor to allow Everyone to access the pipe - $pipePath = "/tmp/$pipeName" - - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") - - # Set permissions using chmod - # bash -c "chmod 777 $pipePath" - - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force - - $connectedServiceName = "${connectedService}" - - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - Write-Host "Hey" - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = $line - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } - - try { - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $endpoint"; - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() - - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - } catch { - Write-Host $_ - } - - - Write-Host $accessToken; - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($accessToken) - $writer.Flush() - } - - # Close the pipe - $reader.Close() - $pipe.Close() - `; - - // Spawn the PowerShell process - let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - - powershell.arg('-Command').arg(content); - - let options = { - failOnStdErr: false, - errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out - outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. - ignoreReturnCode: true - }; - - // Execute the PowerShell command and capture the output - const result = await powershell.exec(options); - - // Check the result and set the task result - if (result === 0) { - tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); - } else { - tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); - } - - // Handle PowerShell exit - powershell.on('close', (code) => { - console.log(`PowerShell process exited with code ${code}`); - }); - - return powershell; -} - -function findPowerShellPath(): Promise { - return new Promise((resolve, reject) => { - const command = 'which pwsh'; - - exec(command, (error, stdout, stderr) => { - if (error) { - console.error(`Error finding PowerShell: ${stderr}`); - resolve(null); - } else { - resolve(stdout.trim()); - } - }); - }); -} - async function run() { try { - // Get inputs. - - const connectedServiceName = tl.getInput("ConnectedServiceName", false); - console.log("connectedServiceName: " + connectedServiceName); - // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - - let pipe_name : string = "praval"; - startNamedPiped(pipe_name, connectedServiceName); + // Get inputs + startNamedPiped(); let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -303,37 +233,35 @@ async function run() { script = `${input_script}`; } - if (connectedServiceName && connectedServiceName.trim().length > 0) { - script = ` + script = ` + # Open the FIFO for writing + + $pipeWriter = [System.IO.StreamWriter]::new('${ps2TsPipePath}') + $pipeReader = [System.IO.StreamReader]::new('${ts2PsPipePath}') - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-Token { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - - $input = "Input" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + function Get-AzDoToken { + try { + $pipeWriter.WriteLine('Get-AzDoToken') + $pipeWriter.Flush() + + $token = $pipeReader.ReadLine() + $token = $token.Trim() + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "empty response was found, returning the System Access Token" + $token = $env:System_Access_Token_PSV2_Task + } + return $token + } + catch { + Write-Host "Error in Get-AzDoToken: $_" + $token = $env:System_Access_Token_PSV2_Task + return $token } + } - ${script} - `; - } + ${script} + `; if (input_showWarnings) { script = ` @@ -350,11 +278,23 @@ async function run() { `; } - tl.debug(script); + script = ` + try { + ${script} + } + finally { + # Close the streams + $pipeWriter.WriteLine('Close') + $pipeWriter.Flush() + $pipeWriter.Close() + $pipeReader.Close() + }` contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); + + console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); @@ -428,6 +368,10 @@ async function run() { } catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); + } finally { + const pipeStream = fs.createWriteStream(ps2TsPipePath); + pipeStream.write('Close'); + pipeStream.close(); } } diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 4abe72abad36..267960f18ae1 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 220 + "Minor": 249, + "Patch": 64 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -39,12 +39,12 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", - "label": "Azure Resource Manager connection", + "label": "Azure DevOps Service Connection", "defaultValue": "", - "helpMarkDown": "Select an Azure Resource Manager service connection" + "helpMarkDown": "Select an Azure DevOps Service Connection service connection" }, { "name": "targetType", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.220", - "Node20-225": "2.248.221" + "Default": "2.249.64", + "Node20-225": "2.249.65" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index 974b2cda311d..f5d140cf9023 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 220 + "Minor": 249, + "Patch": 64 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -39,7 +39,7 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", "label": "ms-resource:loc.input.label.ConnectedServiceName", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.220", - "Node20-225": "2.248.221" + "Default": "2.249.64", + "Node20-225": "2.249.65" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/Auth.ts b/_generated/PowerShellV2_Node20/Auth.ts deleted file mode 100644 index 810a37507a91..000000000000 --- a/_generated/PowerShellV2_Node20/Auth.ts +++ /dev/null @@ -1,85 +0,0 @@ -import * as tl from "azure-pipelines-task-lib/task"; -import * as clientToolUtils from "azure-pipelines-tasks-packaging-common/universal/ClientToolUtilities"; - -const nodeVersion = parseInt(process.version.split('.')[0].replace('v', '')); -if(nodeVersion < 16) { - tl.error(tl.loc('NodeVersionSupport', nodeVersion)); -} - -import * as msal from "@azure/msal-node"; -import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; - -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { - - // workloadidentityfederation - const authorizationScheme = tl - .getEndpointAuthorizationSchemeRequired(connectedService) - .toLowerCase(); - - // get token using workload identity federation or managed service identity - if (authorizationScheme !== "workloadidentityfederation") { - throw new Error(`Authorization scheme ${authorizationScheme} is not supported.`); - } - - // use azure devops webapi to get federated token using service connection - var servicePrincipalId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "serviceprincipalid"); - - var servicePrincipalTenantId: string = - tl.getEndpointAuthorizationParameterRequired(connectedService, "tenantid"); - - const authorityUrl = - tl.getEndpointDataParameter(connectedService, "activeDirectoryAuthority", true) ?? "https://login.microsoftonline.com/"; - - tl.debug(`Getting federated token for service connection ${connectedService}`); - - var federatedToken: string = await getFederatedToken(connectedService); - - tl.debug(`Got federated token for service connection ${connectedService}`); - - // exchange federated token for service principal token (below) - return await getAccessTokenFromFederatedToken(servicePrincipalId, servicePrincipalTenantId, federatedToken, authorityUrl); -} - -async function getAccessTokenFromFederatedToken( - servicePrincipalId: string, - servicePrincipalTenantId: string, - federatedToken: string, - authorityUrl: string -): Promise { - const AzureDevOpsResourceId = "499b84ac-1321-427f-aa17-267ca6975798"; - - // use msal to get access token using service principal with federated token - tl.debug(`Using authority url: ${authorityUrl}`); - tl.debug(`Using resource: ${AzureDevOpsResourceId}`); - - const config: msal.Configuration = { - auth: { - clientId: servicePrincipalId, - authority: `${authorityUrl.replace(/\/+$/, "")}/${servicePrincipalTenantId}`, - clientAssertion: federatedToken, - }, - system: { - loggerOptions: { - loggerCallback: (level, message, containsPii) => { - tl.debug(message); - }, - piiLoggingEnabled: false, - logLevel: msal.LogLevel.Verbose, - }, - }, - }; - - const app = new msal.ConfidentialClientApplication(config); - - const request: msal.ClientCredentialRequest = { - scopes: [`${AzureDevOpsResourceId}/.default`], - skipCache: true, - }; - - const result = await app.acquireTokenByClientCredential(request); - - tl.debug(`Got access token for service principal ${servicePrincipalId}`); - - return result?.accessToken; -} \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson b/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson index 53f60e992ef3..d7810c1fb145 100644 --- a/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/PowerShellV2_Node20/Strings/resources.resjson/en-US/resources.resjson @@ -6,8 +6,8 @@ "loc.releaseNotes": "Script task consistency. Added support for macOS and Linux.", "loc.group.displayName.preferenceVariables": "Preference Variables", "loc.group.displayName.advanced": "Advanced", - "loc.input.label.ConnectedServiceName": "Azure Resource Manager connection", - "loc.input.help.ConnectedServiceName": "Select an Azure Resource Manager service connection", + "loc.input.label.ConnectedServiceName": "Azure DevOps Service Connection", + "loc.input.help.ConnectedServiceName": "Select an Azure DevOps Service Connection service connection", "loc.input.label.targetType": "Type", "loc.input.help.targetType": "Target script type: File Path or Inline", "loc.input.label.filePath": "Script Path", diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index b2658aab6cae..829cab8ed240 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -9,13 +9,12 @@ Import-Module $PSScriptRoot\ps_modules\TlsHelper_ . $PSScriptRoot\helpers.ps1 +$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + class ADOToken { [void] StartNamedPiped() { - try - { $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false Write-Host "Pipe Waiting for a connection..." @@ -23,47 +22,54 @@ class ADOToken { Write-Host "Client connected." $reader = New-Object System.IO.StreamReader($pipe) + while ($true) { $line = $reader.ReadLine() if ($null -eq $line) { break } if($line -eq "Stop-Pipe") {break} - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - $token = "" - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = "$(System.AccessToken)"; - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken + $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "Generated token found to be null, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } else { + Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } } - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = "$(System.AccessToken)"; - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + catch { + Write-Host "Failed to generate token with message $_, returning the System Access Token" + $token = $global:SystemAccessTokenPowershellV2 + } finally { + $writer = New-Object System.IO.StreamWriter($pipe) + $writer.WriteLine($token) + $writer.Flush() } - - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() } Write-Host "Closing the pipe" $reader.Close() $pipe.Close() - } catch { - Write-Host "Something went wrong $_" - } } } @@ -248,7 +254,7 @@ try { } catch { Write-Host "Error in Get-AzDoToken: $_" - return "$(System.AccessToken)" + return $global:SystemAccessTokenPowershellV2 } } diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index 06191ff10ad1..79f4a1ed1760 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -7,12 +7,65 @@ import { validateFileArgs } from './helpers'; import { ArgsSanitizingError } from './errors'; import { emitTelemetry } from 'azure-pipelines-tasks-utility-common/telemetry'; var uuidV4 = require('uuid/v4'); -const { exec } = require('child_process'); import * as msal from "@azure/msal-node"; import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi"; -import * as net from 'net'; +import { spawnSync } from 'child_process'; -export async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { +const ts2PsPipePath = '/tmp/ts2ps'; +const ps2TsPipePath = '/tmp/ps2ts'; + +spawnSync('mkfifo', [ts2PsPipePath]); +spawnSync('mkfifo', [ps2TsPipePath]) + +process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); + +async function startNamedPiped() { + const connectedServiceName = tl.getInput("ConnectedServiceName", false); + console.log("connectedServiceName: " + connectedServiceName); + + const pipeStream = fs.createReadStream(ps2TsPipePath); + const writeStream = fs.createWriteStream(ts2PsPipePath); + + pipeStream.on('data', async (data) => { + const trimmedData = data.toString('utf8').trim(); + console.log(`Received from PowerShell: ${trimmedData}`); + var systemAccessToken = tl.getVariable('System.AccessToken'); + process.env.System_Access_Token_PSV2_Task = systemAccessToken; + + if (trimmedData == 'Get-AzDoToken') { + try { + if(connectedServiceName && connectedServiceName.trim().length > 0) { + const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); + console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + writeStream.write(token + "\n"); + } else { + console.log(`No Service Connection found, returning empty token`); + writeStream.write(systemAccessToken + "\n"); + } + } catch(err) { + console.log(`Token generation failed with error message ${err.message}`); + writeStream.write(systemAccessToken + "\n"); + } + } else { + console.log('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } + }); + + + pipeStream.on('error', (err) => { + console.error('Error with pipe stream:', err); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + }); +} + +async function getAccessTokenViaWorkloadIdentityFederation(connectedService: string): Promise { // workloadidentityfederation const authorizationScheme = tl @@ -97,134 +150,11 @@ function getActionPreference(vstsInputName: string, defaultAction: string = 'Def return result } -async function startNamedPiped(pipeName: string, connectedService: string) { - const content = ` - - # Create a security descriptor to allow Everyone to access the pipe - $pipePath = "/tmp/$pipeName" - - # Create a named pipe with the specified security - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("${pipeName}","InOut") - - # Set permissions using chmod - # bash -c "chmod 777 $pipePath" - - Write-Host "Waiting for a connection..." - $pipe.WaitForConnection() - - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureRestHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsAzureHelpers_ -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/VstsTaskSdk -Force - Import-Module /home/vsts/work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.247.56/ps_modules/TlsHelper_ -Force - - $connectedServiceName = "${connectedService}" - - - Write-Host "Client connected." - - # Read data from the pipe - $reader = New-Object System.IO.StreamReader($pipe) - while ($true) { - Write-Host "Hey" - $line = $reader.ReadLine() - if ($line -eq $null) { break } - - $response = $line - Write-Host "Received: $line" - Write-Host "Sending response: $response" - - $accessToken = @{ - token_type = $null - access_token = $null - expires_on = $null - } - - try { - Write-Host "endpoint for connectedServiceName: $connectedServiceName"; - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - Write-Host "endpoint: $endpoint"; - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint -connectedServiceNameARM $connectedServiceName -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $accessToken.token_type = $result.TokenType - $accessToken.access_token = $result.AccessToken - $accessToken.expires_on = $result.ExpiresOn.ToUnixTimeSeconds() - - Write-Host "Get-ConnectedServiceNameAccessToken: Received accessToken"; - } catch { - Write-Host $_ - } - - - Write-Host $accessToken; - - # Send the response back to the client - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($accessToken) - $writer.Flush() - } - - # Close the pipe - $reader.Close() - $pipe.Close() - `; - - // Spawn the PowerShell process - let powershell = tl.tool(tl.which('pwsh') || tl.which('powershell') || tl.which('pwsh', true)); - - powershell.arg('-Command').arg(content); - - let options = { - failOnStdErr: false, - errStream: process.stdout, // Direct all output to STDOUT, otherwise the output may appear out - outStream: process.stdout, // of order since Node buffers it's own STDOUT but not STDERR. - ignoreReturnCode: true - }; - - // Execute the PowerShell command and capture the output - const result = await powershell.exec(options); - - // Check the result and set the task result - if (result === 0) { - tl.setResult(tl.TaskResult.Succeeded, `Script executed successfully.`); - } else { - tl.setResult(tl.TaskResult.Failed, `Script execution failed with exit code ${result}.`); - } - - // Handle PowerShell exit - powershell.on('close', (code) => { - console.log(`PowerShell process exited with code ${code}`); - }); - - return powershell; -} - -function findPowerShellPath(): Promise { - return new Promise((resolve, reject) => { - const command = 'which pwsh'; - - exec(command, (error, stdout, stderr) => { - if (error) { - console.error(`Error finding PowerShell: ${stderr}`); - resolve(null); - } else { - resolve(stdout.trim()); - } - }); - }); -} - async function run() { try { - // Get inputs. - - const connectedServiceName = tl.getInput("ConnectedServiceName", false); - console.log("connectedServiceName: " + connectedServiceName); - // getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - - let pipe_name : string = "praval"; - startNamedPiped(pipe_name, connectedServiceName); + // Get inputs + startNamedPiped(); let input_errorActionPreference: string = getActionPreference('errorActionPreference', 'Stop'); let input_warningPreference: string = getActionPreference('warningPreference', 'Default'); @@ -303,37 +233,35 @@ async function run() { script = `${input_script}`; } - if (connectedServiceName && connectedServiceName.trim().length > 0) { - script = ` + script = ` + # Open the FIFO for writing + + $pipeWriter = [System.IO.StreamWriter]::new('${ps2TsPipePath}') + $pipeReader = [System.IO.StreamReader]::new('${ts2PsPipePath}') - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "${pipe_name}", [System.IO.Pipes.PipeDirection]::InOut) - $AzDoTokenPipe.Connect(10000) # Wait up to 5 seconds for the connection - Write-Host "Connected to the server." - - function Get-Token { - try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) - - $input = "Input" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - - # Read response from the server - $response = $reader.ReadLine() - Write-Host "Server response: $response" - - } - catch { - Write-Host "Error: $_" - } + function Get-AzDoToken { + try { + $pipeWriter.WriteLine('Get-AzDoToken') + $pipeWriter.Flush() + + $token = $pipeReader.ReadLine() + $token = $token.Trim() + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Host "empty response was found, returning the System Access Token" + $token = $env:System_Access_Token_PSV2_Task + } + return $token + } + catch { + Write-Host "Error in Get-AzDoToken: $_" + $token = $env:System_Access_Token_PSV2_Task + return $token } + } - ${script} - `; - } + ${script} + `; if (input_showWarnings) { script = ` @@ -350,11 +278,23 @@ async function run() { `; } - tl.debug(script); + script = ` + try { + ${script} + } + finally { + # Close the streams + $pipeWriter.WriteLine('Close') + $pipeWriter.Flush() + $pipeWriter.Close() + $pipeReader.Close() + }` contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); + + console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); @@ -428,6 +368,10 @@ async function run() { } catch (err) { tl.setResult(tl.TaskResult.Failed, err.message || 'run() failed'); + } finally { + const pipeStream = fs.createWriteStream(ps2TsPipePath); + pipeStream.write('Close'); + pipeStream.close(); } } diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index 9f05574eacc2..23e89e4e1e2a 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 221 + "Minor": 249, + "Patch": 65 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -39,12 +39,12 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", - "label": "Azure Resource Manager connection", + "label": "Azure DevOps Service Connection", "defaultValue": "", - "helpMarkDown": "Select an Azure Resource Manager service connection" + "helpMarkDown": "Select an Azure DevOps Service Connection service connection" }, { "name": "targetType", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.248.220", - "Node20-225": "2.248.221" + "Default": "2.249.64", + "Node20-225": "2.249.65" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index 1940ad00b3b8..606fd958d391 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -17,8 +17,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 248, - "Patch": 221 + "Minor": 249, + "Patch": 65 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -39,7 +39,7 @@ { "name": "ConnectedServiceName", "aliases": [ - "azureSubscription" + "azureDevOpsServiceConnection" ], "type": "connectedService:workloadidentityuser", "label": "ms-resource:loc.input.label.ConnectedServiceName", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.248.220", - "Node20-225": "2.248.221" + "Default": "2.249.64", + "Node20-225": "2.249.65" } } \ No newline at end of file From d045fcaba115a5fe18820c14f7b94aa6cb4e68a1 Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Thu, 21 Nov 2024 02:52:37 +0530 Subject: [PATCH 11/13] Both worked here. Security added. --- Tasks/PowerShellV2/package-lock.json | 6 +- Tasks/PowerShellV2/powershell.ps1 | 284 +- Tasks/PowerShellV2/powershell.ts | 7 +- Tasks/PowerShellV2/task.json | 2 +- Tasks/PowerShellV2/task.loc.json | 2 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/package-lock.json | 6 +- _generated/PowerShellV2/powershell.ps1 | 284 +- _generated/PowerShellV2/powershell.ts | 7 +- _generated/PowerShellV2/task.json | 6 +- _generated/PowerShellV2/task.loc.json | 6 +- _generated/PowerShellV2_Node20/powershell.ps1 | 284 +- _generated/PowerShellV2_Node20/powershell.ts | 7 +- _generated/PowerShellV2_Node20/task.json | 6 +- _generated/PowerShellV2_Node20/task.loc.json | 6 +- make.js | 171 +- package-lock.json | 3175 +++++++++++------ 17 files changed, 2814 insertions(+), 1449 deletions(-) diff --git a/Tasks/PowerShellV2/package-lock.json b/Tasks/PowerShellV2/package-lock.json index b3a12c13e3c0..b52c2fff6c49 100644 --- a/Tasks/PowerShellV2/package-lock.json +++ b/Tasks/PowerShellV2/package-lock.json @@ -995,9 +995,9 @@ } }, "msal-node2": { - "version": "npm:@azure/msal-node@2.16.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.1.tgz", - "integrity": "sha512-1NEFpTmMMT2A7RnZuvRl/hUmJU+GLPjh+ShyIqPktG2PvSd2yvPnzGd/BxIBAAvJG5nr9lH4oYcQXepDbaE7fg==", + "version": "npm:@azure/msal-node@2.16.2", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.2.tgz", + "integrity": "sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==", "requires": { "@azure/msal-common": "14.16.0", "jsonwebtoken": "^9.0.0", diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 829cab8ed240..ccf2b90aa586 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -1,77 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 -$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - -class ADOToken { - - [void] StartNamedPiped() { - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false - - Write-Host "Pipe Waiting for a connection..." - $pipe.WaitForConnection() - Write-Host "Client connected." - - $reader = New-Object System.IO.StreamReader($pipe) - - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - try { - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - } - catch { - Write-Host "Failed to generate token with message $_, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } finally { - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() - } - } - - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } -} +$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require function Get-ActionPreference { param ( @@ -97,39 +33,139 @@ function Get-ActionPreference { return $result } +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + try { + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Host "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Host "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Host "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Host "Task: Resources cleaned up. Exiting." + } + } +} + + Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require + Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' + $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") + # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - - $global:waitForPipe = $true - $myObject = [ADOToken]::new() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ - param($obj) + param($obj, $filePath) try { - $result = $obj.StartNamedPiped() - return $result + return $obj.run($filePath) } catch { return $_ } - }).AddArgument($myObject) + }).AddArgument($myObject).AddArgument($tokenfilePath) $psRunspace.RunspacePool = $runspacePool - Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - while($global:waitForPipe) { - Write-Host "Waiting for the pipe to start......." - Start-Sleep -Seconds 1 - } - Start-Sleep -Seconds 1 + Start-Sleep 5 - # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -231,34 +267,58 @@ try { ([System.Environment]::NewLine), $contents); + $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) - Write-Host "Trying connect to the server." - $AzDoTokenPipe.Connect(10000) - Write-Host "Connected to the server." - - function Get-AzDoToken { + + # Define file path and event names + $outputFile = "' + $tokenfilePath + '" + $signalFromB = "Global\SignalFromUserScript" + $signalFromA = "Global\SignalFromTask" + + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) + + function Get-AzDoTokenHelper { + Write-Debug "User Script: Starting process to notify Task and read output." + + [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 + try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + # Signal Task to generate access token + $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token." - $input = "Get-AzDoToken" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Wait for Task to finish processing + $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds - $response = $reader.ReadLine() - return $response - } + if (!$receivedResponseBool) { + Write-Debug "User Script: Timeout waiting for Task to respond." + } + else { + try { + [string]$powershellv2AccessToken = (Get-Content -Path $outputFile).Trim() + Write-Debug "UserScript : Read output from file" + $tokenResponse = $powershellv2AccessToken + } catch { + Write-Debug "Error reading the output file: $_" + } + } + } catch { - Write-Host "Error in Get-AzDoToken: $_" - return $global:SystemAccessTokenPowershellV2 + Write-Host "Error occurred in Get-AzDoTokenHelper : $_" } + + return $tokenResponse + } + + function Get-AzDoToken { + $token = Get-AzDoTokenHelper + $token = $token | Out-String + $token = $token.Substring(4).Trim() + return $token } - ' + $joinedContents; + ' + $joinedContents if ($input_showWarnings) { $joinedContents = ' @@ -273,15 +333,6 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } - $joinedContents = 'try { '+ $joinedContents + '} - finally { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $input = "Stop-Pipe" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - }' - # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -320,7 +371,7 @@ try { # Switch to "Continue". $global:ErrorActionPreference = 'Continue' $failed = $false - + # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -387,9 +438,10 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { - # Clean up runspace resources - $psRunspace.Dispose() - $runspacePool.Close() - $runspacePool.Dispose() + # Signal Script A to exit + $exitSignal = "Global\ExitSignal" + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + $eventExit.Set() + Write-Host "Exit signal sent to Task." Trace-VstsLeavingInvocation $MyInvocation -} +} \ No newline at end of file diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index 79f4a1ed1760..d4a7504ecb44 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -15,7 +15,10 @@ const ts2PsPipePath = '/tmp/ts2ps'; const ps2TsPipePath = '/tmp/ps2ts'; spawnSync('mkfifo', [ts2PsPipePath]); -spawnSync('mkfifo', [ps2TsPipePath]) +spawnSync('mkfifo', [ps2TsPipePath]); + +spawnSync('chmod', ['600', ts2PsPipePath]); +spawnSync('chmod', ['600', ps2TsPipePath]); process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); @@ -293,8 +296,6 @@ async function run() { contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); - - console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 87f1c28f6453..9ea47cf9649c 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 64 + "Patch": 234 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 31acd0224949..f2a2ff1afff0 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 64 + "Patch": 234 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 08f4efbca8c1..59aa7ece593c 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.249.64 -Node20-225|2.249.65 +Default|2.249.234 +Node20-225|2.249.235 diff --git a/_generated/PowerShellV2/package-lock.json b/_generated/PowerShellV2/package-lock.json index b3a12c13e3c0..b52c2fff6c49 100644 --- a/_generated/PowerShellV2/package-lock.json +++ b/_generated/PowerShellV2/package-lock.json @@ -995,9 +995,9 @@ } }, "msal-node2": { - "version": "npm:@azure/msal-node@2.16.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.1.tgz", - "integrity": "sha512-1NEFpTmMMT2A7RnZuvRl/hUmJU+GLPjh+ShyIqPktG2PvSd2yvPnzGd/BxIBAAvJG5nr9lH4oYcQXepDbaE7fg==", + "version": "npm:@azure/msal-node@2.16.2", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.16.2.tgz", + "integrity": "sha512-An7l1hEr0w1HMMh1LU+rtDtqL7/jw74ORlc9Wnh06v7TU/xpG39/Zdr1ZJu3QpjUfKJ+E0/OXMW8DRSWTlh7qQ==", "requires": { "@azure/msal-common": "14.16.0", "jsonwebtoken": "^9.0.0", diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 829cab8ed240..ccf2b90aa586 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -1,77 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 -$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - -class ADOToken { - - [void] StartNamedPiped() { - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false - - Write-Host "Pipe Waiting for a connection..." - $pipe.WaitForConnection() - Write-Host "Client connected." - - $reader = New-Object System.IO.StreamReader($pipe) - - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - try { - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - } - catch { - Write-Host "Failed to generate token with message $_, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } finally { - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() - } - } - - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } -} +$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require function Get-ActionPreference { param ( @@ -97,39 +33,139 @@ function Get-ActionPreference { return $result } +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + try { + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Host "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Host "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Host "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Host "Task: Resources cleaned up. Exiting." + } + } +} + + Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require + Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' + $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") + # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - - $global:waitForPipe = $true - $myObject = [ADOToken]::new() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ - param($obj) + param($obj, $filePath) try { - $result = $obj.StartNamedPiped() - return $result + return $obj.run($filePath) } catch { return $_ } - }).AddArgument($myObject) + }).AddArgument($myObject).AddArgument($tokenfilePath) $psRunspace.RunspacePool = $runspacePool - Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - while($global:waitForPipe) { - Write-Host "Waiting for the pipe to start......." - Start-Sleep -Seconds 1 - } - Start-Sleep -Seconds 1 + Start-Sleep 5 - # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -231,34 +267,58 @@ try { ([System.Environment]::NewLine), $contents); + $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) - Write-Host "Trying connect to the server." - $AzDoTokenPipe.Connect(10000) - Write-Host "Connected to the server." - - function Get-AzDoToken { + + # Define file path and event names + $outputFile = "' + $tokenfilePath + '" + $signalFromB = "Global\SignalFromUserScript" + $signalFromA = "Global\SignalFromTask" + + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) + + function Get-AzDoTokenHelper { + Write-Debug "User Script: Starting process to notify Task and read output." + + [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 + try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + # Signal Task to generate access token + $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token." - $input = "Get-AzDoToken" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Wait for Task to finish processing + $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds - $response = $reader.ReadLine() - return $response - } + if (!$receivedResponseBool) { + Write-Debug "User Script: Timeout waiting for Task to respond." + } + else { + try { + [string]$powershellv2AccessToken = (Get-Content -Path $outputFile).Trim() + Write-Debug "UserScript : Read output from file" + $tokenResponse = $powershellv2AccessToken + } catch { + Write-Debug "Error reading the output file: $_" + } + } + } catch { - Write-Host "Error in Get-AzDoToken: $_" - return $global:SystemAccessTokenPowershellV2 + Write-Host "Error occurred in Get-AzDoTokenHelper : $_" } + + return $tokenResponse + } + + function Get-AzDoToken { + $token = Get-AzDoTokenHelper + $token = $token | Out-String + $token = $token.Substring(4).Trim() + return $token } - ' + $joinedContents; + ' + $joinedContents if ($input_showWarnings) { $joinedContents = ' @@ -273,15 +333,6 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } - $joinedContents = 'try { '+ $joinedContents + '} - finally { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $input = "Stop-Pipe" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - }' - # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -320,7 +371,7 @@ try { # Switch to "Continue". $global:ErrorActionPreference = 'Continue' $failed = $false - + # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -387,9 +438,10 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { - # Clean up runspace resources - $psRunspace.Dispose() - $runspacePool.Close() - $runspacePool.Dispose() + # Signal Script A to exit + $exitSignal = "Global\ExitSignal" + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + $eventExit.Set() + Write-Host "Exit signal sent to Task." Trace-VstsLeavingInvocation $MyInvocation -} +} \ No newline at end of file diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index 79f4a1ed1760..d4a7504ecb44 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -15,7 +15,10 @@ const ts2PsPipePath = '/tmp/ts2ps'; const ps2TsPipePath = '/tmp/ps2ts'; spawnSync('mkfifo', [ts2PsPipePath]); -spawnSync('mkfifo', [ps2TsPipePath]) +spawnSync('mkfifo', [ps2TsPipePath]); + +spawnSync('chmod', ['600', ts2PsPipePath]); +spawnSync('chmod', ['600', ps2TsPipePath]); process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); @@ -293,8 +296,6 @@ async function run() { contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); - - console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 267960f18ae1..505944797a43 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 64 + "Patch": 234 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.64", - "Node20-225": "2.249.65" + "Default": "2.249.234", + "Node20-225": "2.249.235" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index f5d140cf9023..1b9f3d83277b 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 64 + "Patch": 234 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.64", - "Node20-225": "2.249.65" + "Default": "2.249.234", + "Node20-225": "2.249.235" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 829cab8ed240..ccf2b90aa586 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -1,77 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\Sanitizer Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ -Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Import-Module $PSScriptRoot\ps_modules\TlsHelper_ +Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 -$global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - -class ADOToken { - - [void] StartNamedPiped() { - $pipe = New-Object System.IO.Pipes.NamedPipeServerStream("PowershellV2TaskPipe","InOut") - $global:waitForPipe = $false - - Write-Host "Pipe Waiting for a connection..." - $pipe.WaitForConnection() - Write-Host "Client connected." - - $reader = New-Object System.IO.StreamReader($pipe) - - while ($true) { - $line = $reader.ReadLine() - if ($null -eq $line) { break } - if($line -eq "Stop-Pipe") {break} - - try { - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $global:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Host "Generated token found to be null, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } else { - Write-Host "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - } - catch { - Write-Host "Failed to generate token with message $_, returning the System Access Token" - $token = $global:SystemAccessTokenPowershellV2 - } finally { - $writer = New-Object System.IO.StreamWriter($pipe) - $writer.WriteLine($token) - $writer.Flush() - } - } - - Write-Host "Closing the pipe" - $reader.Close() - $pipe.Close() - } -} +$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require function Get-ActionPreference { param ( @@ -97,39 +33,139 @@ function Get-ActionPreference { return $result } +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + try { + + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + + $token = "" + + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote output to file at $token" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Host "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Host "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Host "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Host "Task: Resources cleaned up. Exiting." + } + } +} + + Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require + Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' + $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") + # Create a runspace to handle the Get-DerivedValue function $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() - - $global:waitForPipe = $true - $myObject = [ADOToken]::new() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ - param($obj) + param($obj, $filePath) try { - $result = $obj.StartNamedPiped() - return $result + return $obj.run($filePath) } catch { return $_ } - }).AddArgument($myObject) + }).AddArgument($myObject).AddArgument($tokenfilePath) $psRunspace.RunspacePool = $runspacePool - Write-Host "Starting Pipe......." $psRunspace.BeginInvoke() - while($global:waitForPipe) { - Write-Host "Waiting for the pipe to start......." - Start-Sleep -Seconds 1 - } - Start-Sleep -Seconds 1 + Start-Sleep 5 - # Get inputs. $input_errorActionPreference = Get-ActionPreference -VstsInputName 'errorActionPreference' -DefaultAction 'Stop' $input_warningPreference = Get-ActionPreference -VstsInputName 'warningPreference' -DefaultAction 'Default' @@ -231,34 +267,58 @@ try { ([System.Environment]::NewLine), $contents); + $joinedContents = ' - - $AzDoTokenPipe = New-Object System.IO.Pipes.NamedPipeClientStream(".", "PowershellV2TaskPipe", [System.IO.Pipes.PipeDirection]::InOut) - Write-Host "Trying connect to the server." - $AzDoTokenPipe.Connect(10000) - Write-Host "Connected to the server." - - function Get-AzDoToken { + + # Define file path and event names + $outputFile = "' + $tokenfilePath + '" + $signalFromB = "Global\SignalFromUserScript" + $signalFromA = "Global\SignalFromTask" + + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) + + function Get-AzDoTokenHelper { + Write-Debug "User Script: Starting process to notify Task and read output." + + [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 + try { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $reader = New-Object System.IO.StreamReader($AzDoTokenPipe) + # Signal Task to generate access token + $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token." - $input = "Get-AzDoToken" - - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() + # Wait for Task to finish processing + $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds - $response = $reader.ReadLine() - return $response - } + if (!$receivedResponseBool) { + Write-Debug "User Script: Timeout waiting for Task to respond." + } + else { + try { + [string]$powershellv2AccessToken = (Get-Content -Path $outputFile).Trim() + Write-Debug "UserScript : Read output from file" + $tokenResponse = $powershellv2AccessToken + } catch { + Write-Debug "Error reading the output file: $_" + } + } + } catch { - Write-Host "Error in Get-AzDoToken: $_" - return $global:SystemAccessTokenPowershellV2 + Write-Host "Error occurred in Get-AzDoTokenHelper : $_" } + + return $tokenResponse + } + + function Get-AzDoToken { + $token = Get-AzDoTokenHelper + $token = $token | Out-String + $token = $token.Substring(4).Trim() + return $token } - ' + $joinedContents; + ' + $joinedContents if ($input_showWarnings) { $joinedContents = ' @@ -273,15 +333,6 @@ try { Invoke-Command {' + $joinedContents + '} -WarningVariable +warnings'; } - $joinedContents = 'try { '+ $joinedContents + '} - finally { - $writer = New-Object System.IO.StreamWriter($AzDoTokenPipe) - $input = "Stop-Pipe" - # Send command to the server - $writer.WriteLine($input) - $writer.Flush() - }' - # Write the script to disk. Assert-VstsAgent -Minimum '2.115.0' $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require @@ -320,7 +371,7 @@ try { # Switch to "Continue". $global:ErrorActionPreference = 'Continue' $failed = $false - + # Run the script. Write-Host '========================== Starting Command Output ===========================' if (!$input_failOnStderr) { @@ -387,9 +438,10 @@ catch { Write-VstsSetResult -Result 'Failed' -Message "Error detected" -DoNotThrow } finally { - # Clean up runspace resources - $psRunspace.Dispose() - $runspacePool.Close() - $runspacePool.Dispose() + # Signal Script A to exit + $exitSignal = "Global\ExitSignal" + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + $eventExit.Set() + Write-Host "Exit signal sent to Task." Trace-VstsLeavingInvocation $MyInvocation -} +} \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index 79f4a1ed1760..d4a7504ecb44 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -15,7 +15,10 @@ const ts2PsPipePath = '/tmp/ts2ps'; const ps2TsPipePath = '/tmp/ps2ts'; spawnSync('mkfifo', [ts2PsPipePath]); -spawnSync('mkfifo', [ps2TsPipePath]) +spawnSync('mkfifo', [ps2TsPipePath]); + +spawnSync('chmod', ['600', ts2PsPipePath]); +spawnSync('chmod', ['600', ps2TsPipePath]); process.env.System_Access_Token_PSV2_Task = tl.getVariable('System.AccessToken'); @@ -293,8 +296,6 @@ async function run() { contents.push(script); // log with detail to avoid a warning output. tl.logDetail(uuidV4(), tl.loc('JS_FormattedCommand', script), null, 'command', 'command', 0); - - console.log(script) if (!input_ignoreLASTEXITCODE) { contents.push(`if (!(Test-Path -LiteralPath variable:\LASTEXITCODE)) {`); diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index 23e89e4e1e2a..da6e0353ea1c 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 65 + "Patch": 235 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.64", - "Node20-225": "2.249.65" + "Default": "2.249.234", + "Node20-225": "2.249.235" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index 606fd958d391..d6373fa68a23 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 65 + "Patch": 235 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.64", - "Node20-225": "2.249.65" + "Default": "2.249.234", + "Node20-225": "2.249.235" } } \ No newline at end of file diff --git a/make.js b/make.js index f7913b421973..296ecbf7ce95 100644 --- a/make.js +++ b/make.js @@ -1,6 +1,10 @@ // parse command line options var argv = require('minimist')(process.argv.slice(2)); +if (process.env.IncludeLocalPackagesBuildConfigTest === "1") { + argv.includeLocalPackagesBuildConfig=true; +} + // modules var fs = require('fs'); var os = require('os'); @@ -56,7 +60,11 @@ var packagePath = path.join(__dirname, '_package'); var coverageTasksPath = path.join(buildPath, 'coverage'); var baseConfigToolPath = path.join(__dirname, 'BuildConfigGen'); var genTaskPath = path.join(__dirname, '_generated'); +var genTaskPathLocal = path.join(__dirname, '_generated_local'); var genTaskCommonPath = path.join(__dirname, '_generated', 'Common'); +var genTaskCommonPathLocal = path.join(__dirname, '_generated_local', 'Common'); +var taskLibPath = path.join(__dirname, 'task-lib/node'); +var tasksCommonPath = path.join(__dirname, 'tasks-common'); var CLI = {}; @@ -100,6 +108,18 @@ if (argv.task) { } else { // load the default list taskList = fileToJson(makeOptionsPath).tasks; + + if (argv.skipToTask) + { + var skipToTaskIndex = taskList.indexOf(argv.skipToTask); + + if (skipToTaskIndex==-1) + { + fail('argv.skipToTask (' + argv.skipToTask + ') not found'); + } + + taskList = taskList.slice(skipToTaskIndex); + } } // set the runner options. should either be empty or a comma delimited list of test runners. @@ -108,14 +128,27 @@ if (argv.task) { // note, currently the ts runner igores this setting and will always run. process.env['TASK_TEST_RUNNER'] = argv.runner || ''; -function getTaskList(taskList) { +function getTaskList(taskList, includeLocalPackagesBuildConfig) { let tasksToBuild = taskList; if (!fs.existsSync(genTaskPath)) return tasksToBuild; - const generatedTaskFolders = fs.readdirSync(genTaskPath) - .filter((taskName) => { - return fs.statSync(path.join(genTaskPath, taskName)).isDirectory(); + var generatedTaskFolders = fs.readdirSync(genTaskPath); + + if(includeLocalPackagesBuildConfig) + { + if(fs.existsSync(genTaskPathLocal)) + { + generatedTaskFolders = generatedTaskFolders.concat(fs.readdirSync(genTaskPathLocal)); + } + } + + generatedTaskFolders = generatedTaskFolders.filter((taskName) => { + return !taskName.endsWith(".versionmap.txt") + && ( + (((includeLocalPackagesBuildConfig && fs.existsSync(path.join(genTaskPath, taskName))) || !includeLocalPackagesBuildConfig) && fs.statSync(path.join(genTaskPath, taskName)).isDirectory()) + || (includeLocalPackagesBuildConfig && fs.statSync(path.join(genTaskPathLocal, taskName)).isDirectory()) + ); }); taskList.forEach((taskName) => { @@ -205,18 +238,56 @@ CLI.serverBuild = async function(/** @type {{ task: string }} */ argv) { }); // Need to validate generated tasks first - const makeOptions = fileToJson(makeOptionsPath); + if (!argv.skipPrebuildSteps) + { + const makeOptions = fileToJson(makeOptionsPath); + + // Verify generated files across tasks are up-to-date + util.processGeneratedTasks(baseConfigToolPath, taskList, makeOptions, writeUpdatedsFromGenTasks, argv.sprint, argv['debug-agent-dir'], argv.includeLocalPackagesBuildConfig); + } - // Verify generated files across tasks are up-to-date - util.processGeneratedTasks(baseConfigToolPath, taskList, makeOptions, writeUpdatedsFromGenTasks, argv.sprint, argv['debug-agent-dir']); + if (argv.includeLocalPackagesBuildConfig) + { + if (!argv.skipPrebuildSteps) + { + // temp: clone for now prior to merging these as subtrees + if (!test('-d', 'task-lib')) { + run("git clone https://github.com/microsoft/azure-pipelines-task-lib task-lib"); + } + + if (!test('-d', 'tasks-common')) { + run("git clone https://github.com/microsoft/azure-pipelines-tasks-common-packages tasks-common"); + } + + cd(taskLibPath); + run("git checkout dev/merlynop/mockfix"); + run("git pull"); + + cd(tasksCommonPath); + run("git pull"); + // end temp + + // build task-lib + cd(taskLibPath); + run("npm install", /*inheritStreams:*/true); + run("node make.js build", /*inheritStreams:*/true); + + + await util.installNodeAsync('20'); + // build task-lib + cd(tasksCommonPath); + run("npm install", /*inheritStreams:*/true); + run("node make.js --build", /*inheritStreams:*/true); + } + } - const allTasks = getTaskList(taskList); + const allTasks = getTaskList(taskList, argv.includeLocalPackagesBuildConfig); // Wrap build function to store files that changes after the build - const buildTaskWrapped = util.syncGeneratedFilesWrapper(buildTaskAsync, genTaskPath, writeUpdatedsFromGenTasks); + const buildTaskWrapped = util.syncGeneratedFilesWrapper(buildTaskAsync, genTaskPath, genTaskPathLocal, argv.includeLocalPackagesBuildConfig, writeUpdatedsFromGenTasks); const { allTasksNode20, allTasksDefault } = allTasks. reduce((res, taskName) => { - if (getNodeVersion(taskName) == 20) { + if (getNodeVersion(taskName, argv.includeLocalPackagesBuildConfig) == 20) { res.allTasksNode20.push(taskName) } else { res.allTasksDefault.push(taskName) @@ -245,14 +316,26 @@ CLI.serverBuild = async function(/** @type {{ task: string }} */ argv) { rm('-Rf', genTaskCommonPath); } + if (fs.existsSync(genTaskCommonPathLocal)) + { + rm('-Rf', genTaskCommonPathLocal); + } + banner('Build successful', true); } -function getNodeVersion (taskName) { +function getNodeVersion (taskName, includeLocalPackagesBuildConfig) { let taskPath = tasksPath; // if task exists inside gen folder prefere it if (fs.existsSync(path.join(genTaskPath, taskName))) { taskPath = genTaskPath; + } + else if(includeLocalPackagesBuildConfig) + { + if(fs.existsSync(path.join(genTaskPathLocal, taskName))) + { + taskPath = genTaskPathLocal; + } } // get node runner from task.json @@ -260,7 +343,6 @@ function getNodeVersion (taskName) { if (handlers.includes(20)) return 20; return 10; - } async function buildTaskAsync(taskName, taskListLength, nodeVersion, isServerBuild = false) { @@ -270,11 +352,20 @@ async function buildTaskAsync(taskName, taskListLength, nodeVersion, isServerBui // If we have the task in generated folder, prefer to build from there and add all generated tasks which starts with task name var taskPath = path.join(genTaskPath, taskName); + var localTaskPath = path.join(genTaskPathLocal, taskName); if (fs.existsSync(taskPath)) { // Need to add all tasks which starts with task name console.log('Found generated task: ' + taskName); isGeneratedTask = true; - } else { + } + else if (argv.includeLocalPackagesBuildConfig && fs.existsSync(localTaskPath)) + { + console.log('Found local generated task: ' + taskName); + isGeneratedTask = true; + taskPath = localTaskPath; + } + else + { taskPath = path.join(tasksPath, taskName); } @@ -330,16 +421,20 @@ async function buildTaskAsync(taskName, taskListLength, nodeVersion, isServerBui var modName = path.basename(modPath); var modOutDir = path.join(buildTasksCommonPath, modName); - console.log('Common Module : {modPath = ' + modPath + " , modName = " + modName + " , modOutDir = " + modOutDir) - console.log(test('-d', modOutDir)) - if (test('-d', modOutDir)) { - + if (!test('-d', modOutDir)) { banner('Building module ' + modPath, true); - // Ensure that Common folder exists for _generated tasks, otherwise copy it from Tasks folder + // Ensure that Common folder exists for _generated or _generated_local tasks, otherwise copy it from Tasks folder if (!fs.existsSync(genTaskCommonPath) && isGeneratedTask) { cp('-Rf', path.resolve(tasksPath, "Common"), genTaskCommonPath); } + + if(argv.includeLocalPackagesBuildConfig) + { + if (!fs.existsSync(genTaskCommonPathLocal) && isGeneratedTask) { + cp('-Rf', path.resolve(tasksPath, "Common"), genTaskCommonPathLocal); + } + } mkdir('-p', modOutDir); @@ -495,7 +590,7 @@ CLI.test = async function(/** @type {{ suite: string; node: string; task: string matchCopy(path.join('**', '@(*.ps1|*.psm1)'), path.join(testsPath, 'lib'), path.join(buildTestsPath, 'lib')); var suiteType = argv.suite || 'L0'; - async function runTaskTests(taskName) { + async function runTaskTests(taskName, results) { banner('Testing: ' + taskName); // find the tests var nodeVersions = argv.node ? new Array(argv.node) : [Math.max(...getTaskNodeVersion(buildTasksPath, taskName))]; @@ -528,27 +623,29 @@ CLI.test = async function(/** @type {{ suite: string; node: string; task: string if (isNodeTask && !isReportWasFormed && nodeVersion >= 10) { - run('nyc --all -n ' + taskPath + ' --report-dir ' + coverageTasksPath + ' mocha ' + testsSpec.join(' '), /*inheritStreams:*/true); + run('nyc --all -n ' + taskPath + ' --report-dir ' + coverageTasksPath + ' mocha ' + testsSpec.join(' '), /*inheritStreams:*/true, /*noHeader*/ false, /*throwOnError*/ true); util.renameCodeCoverageOutput(coverageTasksPath, taskName); isReportWasFormed = true; } else { - run('mocha ' + testsSpec.join(' '), /*inheritStreams:*/true); + run('mocha ' + testsSpec.join(' '), /*inheritStreams:*/true, /*noHeader*/ false, /*throwOnError*/ true); } } catch (e) { console.error(e); - process.exit(1); + results.push({ taskName: taskName, result: `NodeVersion: ${nodeVersion} Error: ${e}` }); } } } + const results = []; + // Run tests for each task that exists - const allTasks = getTaskList(taskList); + const allTasks = getTaskList(taskList, argv.includeLocalPackagesBuildConfig); for (const taskName of allTasks) { var taskPath = path.join(buildTasksPath, taskName); if (fs.existsSync(taskPath)) { - await runTaskTests(taskName); + await runTaskTests(taskName, results); } }; @@ -562,7 +659,12 @@ CLI.test = async function(/** @type {{ suite: string; node: string; task: string if (specs.length > 0) { // setup the version of node to run the tests await util.installNodeAsync(argv.node); - run('mocha ' + specs.join(' '), /*inheritStreams:*/true); + try{ + run('mocha ' + specs.join(' '), /*inheritStreams:*/true, /*noHeader*/ false, /*throwOnError*/ true); + }catch(e){ + console.error(e); + results.push({ taskName: 'commonLibraryTests', result: `NodeVersion: ${nodeVersion} Error: ${error.message}` }); + } } else { console.warn("No common library tests found"); } @@ -575,7 +677,13 @@ CLI.test = async function(/** @type {{ suite: string; node: string; task: string if (specs.length > 0) { // setup the version of node to run the tests await util.installNodeAsync(argv.node); - run('mocha ' + specs.join(' '), /*inheritStreams:*/true); + try + { + run('mocha ' + specs.join(' '), /*inheritStreams:*/true, /*noHeader*/ false, /*throwOnError*/ true); + }catch(e){ + console.error(e); + results.push({ taskName: 'common tests', result: `NodeVersion: ${nodeVersion} Error: ${error.message}` }); + } } else { console.warn("No common tests found"); } @@ -592,6 +700,17 @@ CLI.test = async function(/** @type {{ suite: string; node: string; task: string } catch (e) { console.log('Error while generating coverage report') } + + var hasErrors = false; + results.forEach(({ taskName, result }) => { + hasErrors = true; + console.log(`Task: ${taskName}, Result: ${result}`); + }); + + if (hasErrors) { + console.log('Errors occurred during tests'); + process.exit(1); + } } // diff --git a/package-lock.json b/package-lock.json index 16859b11b2b4..5f023a3ed5cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,41 +1,76 @@ { "name": "Agent.Tasks", "version": "0.6.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@ampproject/remapping": { + "packages": { + "": { + "name": "Agent.Tasks", + "version": "0.6.0", + "license": "MIT", + "dependencies": { + "agent-base": "^6.0.2" + }, + "devDependencies": { + "adm-zip": "0.4.13", + "azure-devops-node-api": "^12.2.0", + "js-yaml": "^3.13.1", + "minimatch": "3.0.2", + "minimist": "^1.2.8", + "mocha": "^6.2.3", + "node-fetch": "2.6.11", + "node-uuid": "1.4.6", + "nodejs-file-downloader": "^4.11.1", + "nyc": "^15.1.0", + "q": "1.4.1", + "semver": "4.3.3", + "shelljs": "^0.8.5", + "typed-rest-client": "^1.8.9", + "typescript": "4.0.2", + "validator": "^13.7.0" + } + }, + "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" } }, - "@babel/code-frame": { + "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, - "requires": { + "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/compat-data": { + "node_modules/@babel/compat-data": { "version": "7.24.9", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz", "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/core": { + "node_modules/@babel/core": { "version": "7.24.9", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", "dev": true, - "requires": { + "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.24.9", @@ -52,202 +87,273 @@ "json5": "^2.2.3", "semver": "^6.3.1" }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "dependencies": { - "convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@babel/generator": { + "node_modules/@babel/core/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { "version": "7.24.10", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz", "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.24.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-compilation-targets": { + "node_modules/@babel/helper-compilation-targets": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.24.8", "@babel/helper-validator-option": "^7.24.8", "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "@babel/helper-environment-visitor": { + "node_modules/@babel/helper-environment-visitor": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-function-name": { + "node_modules/@babel/helper-function-name": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dev": true, - "requires": { + "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-hoist-variables": { + "node_modules/@babel/helper-hoist-variables": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-module-imports": { + "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, - "requires": { + "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-module-transforms": { + "node_modules/@babel/helper-module-transforms": { "version": "7.24.9", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz", "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", "@babel/helper-split-export-declaration": "^7.24.7", "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-simple-access": { + "node_modules/@babel/helper-simple-access": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, - "requires": { + "dependencies": { "@babel/traverse": "^7.24.7", "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-split-export-declaration": { + "node_modules/@babel/helper-split-export-declaration": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-string-parser": { + "node_modules/@babel/helper-string-parser": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-validator-identifier": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-validator-option": { + "node_modules/@babel/helper-validator-option": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helpers": { + "node_modules/@babel/helpers": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz", "integrity": "sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==", "dev": true, - "requires": { + "dependencies": { "@babel/template": "^7.24.7", "@babel/types": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/highlight": { + "node_modules/@babel/highlight": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/parser": { + "node_modules/@babel/parser": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", - "dev": true + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } }, - "@babel/template": { + "node_modules/@babel/template": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/parser": "^7.24.7", "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/traverse": { + "node_modules/@babel/traverse": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz", "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.24.8", "@babel/helper-environment-visitor": "^7.24.7", @@ -259,229 +365,299 @@ "debug": "^4.3.1", "globals": "^11.1.0" }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "dependencies": { - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@babel/types": { + "node_modules/@babel/traverse/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@babel/types": { "version": "7.24.9", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@istanbuljs/load-nyc-config": { + "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, - "@istanbuljs/schema": { + "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "@jridgewell/gen-mapping": { + "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" } }, - "@jridgewell/resolve-uri": { + "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/set-array": { + "node_modules/@jridgewell/set-array": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/sourcemap-codec": { + "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, - "@jridgewell/trace-mapping": { + "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "adm-zip": { + "node_modules/adm-zip": { "version": "0.4.13", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.3.0" + } }, - "agent-base": { + "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "requires": { + "dependencies": { "debug": "4" }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dependencies": { - "debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "aggregate-error": { + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, - "requires": { + "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "ansi-colors": { + "node_modules/ansi-colors": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "ansi-regex": { + "node_modules/ansi-regex": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "requires": { + "dependencies": { "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "append-transform": { + "node_modules/append-transform": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", "dev": true, - "requires": { + "dependencies": { "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "archy": { + "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, - "argparse": { + "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "requires": { + "dependencies": { "sprintf-js": "~1.0.2" } }, - "array-buffer-byte-length": { + "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.5", "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "array.prototype.reduce": { + "node_modules/array.prototype.reduce": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.7.tgz", "integrity": "sha512-mzmiUCVwtiD4lgxYP8g7IYy8El8p2CSMePvIbTS7gchKir/L1fgJrk0yDKmAX6mnRQFKNADYIk8nNlTris5H1Q==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", @@ -489,14 +665,20 @@ "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "arraybuffer.prototype.slice": { + "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, - "requires": { + "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", "define-properties": "^1.2.1", @@ -505,323 +687,445 @@ "get-intrinsic": "^1.2.3", "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "available-typed-arrays": { + "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, - "requires": { + "dependencies": { "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "azure-devops-node-api": { + "node_modules/azure-devops-node-api": { "version": "12.5.0", "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", "dev": true, - "requires": { + "dependencies": { "tunnel": "0.0.6", "typed-rest-client": "^1.8.4" } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "browser-stdout": { + "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, - "browserslist": { + "node_modules/browserslist": { "version": "4.23.2", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", "dev": true, - "requires": { + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { "caniuse-lite": "^1.0.30001640", "electron-to-chromium": "^1.4.820", "node-releases": "^2.0.14", "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "caching-transform": { + "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", "dev": true, - "requires": { + "dependencies": { "hasha": "^5.0.0", "make-dir": "^3.0.0", "package-hash": "^4.0.0", "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "call-bind": { + "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, - "requires": { + "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "camelcase": { + "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "caniuse-lite": { + "node_modules/caniuse-lite": { "version": "1.0.30001642", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", - "dev": true + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, - "chalk": { + "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "clean-stack": { + "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "cliui": { + "node_modules/cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, - "requires": { + "dependencies": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", "wrap-ansi": "^5.1.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } }, - "color-convert": { + "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "requires": { + "dependencies": { "color-name": "1.1.3" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "commondir": { + "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "convert-source-map": { + "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "cross-spawn": { + "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "requires": { + "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "data-view-buffer": { + "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "data-view-byte-length": { + "node_modules/data-view-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "data-view-byte-offset": { + "node_modules/data-view-byte-offset": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "debug": { + "node_modules/debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", "dev": true, - "requires": { + "dependencies": { "ms": "^2.1.1" } }, - "decamelize": { + "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "default-require-extensions": { + "node_modules/default-require-extensions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", "dev": true, - "requires": { + "dependencies": { "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "define-data-property": { + "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, - "requires": { + "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "define-properties": { + "node_modules/define-properties": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, - "requires": { + "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "diff": { + "node_modules/diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.3.1" + } }, - "electron-to-chromium": { + "node_modules/electron-to-chromium": { "version": "1.4.829", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.829.tgz", "integrity": "sha512-5qp1N2POAfW0u1qGAxXEtz6P7bO1m6gpZr5hdf5ve6lxpLM7MpiM4jIPz7xcrNlClQMafbyUDDWjlIQZ1Mw0Rw==", "dev": true }, - "emoji-regex": { + "node_modules/emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "es-abstract": { + "node_modules/es-abstract": { "version": "1.23.3", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, - "requires": { + "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", "available-typed-arrays": "^1.0.7", @@ -869,235 +1173,353 @@ "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.15" }, - "dependencies": { - "object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - } + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true - }, - "es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "node_modules/es-abstract/node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", "dev": true, - "requires": { + "dependencies": { "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" } }, - "es-errors": { + "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + } }, - "es-object-atoms": { + "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, - "requires": { + "dependencies": { "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" } }, - "es-set-tostringtag": { + "node_modules/es-set-tostringtag": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, - "requires": { + "dependencies": { "get-intrinsic": "^1.2.4", "has-tostringtag": "^1.0.2", "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" } }, - "es-to-primitive": { + "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "requires": { + "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "es6-error": { + "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, - "escalade": { + "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "esprima": { + "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } }, - "find-cache-dir": { + "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", "dev": true, - "requires": { + "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, - "find-up": { + "node_modules/find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, - "requires": { + "dependencies": { "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "flat": { + "node_modules/flat": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "dev": true, - "requires": { + "dependencies": { "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" } }, - "follow-redirects": { + "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "dev": true + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } }, - "for-each": { + "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "requires": { + "dependencies": { "is-callable": "^1.1.3" } }, - "foreground-child": { + "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", "dev": true, - "requires": { + "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" } }, - "fromentries": { + "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "function-bind": { + "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "function.prototype.name": { + "node_modules/function.prototype.name": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "functions-have-names": { + "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "gensync": { + "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "get-caller-file": { + "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } }, - "get-intrinsic": { + "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, - "requires": { + "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "get-package-type": { + "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.0.0" + } }, - "get-symbol-description": { + "node_modules/get-symbol-description": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "glob": { + "node_modules/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "requires": { + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", @@ -1105,415 +1527,618 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, + "engines": { + "node": "*" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "globals": { + "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "globalthis": { + "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, - "requires": { + "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "gopd": { + "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "requires": { + "dependencies": { "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "graceful-fs": { + "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "growl": { + "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4.x" + } }, - "has-bigints": { + "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-flag": { + "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "has-property-descriptors": { + "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, - "requires": { + "dependencies": { "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "has-proto": { + "node_modules/has-proto": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-symbols": { + "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "has-tostringtag": { + "node_modules/has-tostringtag": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, - "requires": { + "dependencies": { "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "hasha": { + "node_modules/hasha": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, - "requires": { + "dependencies": { "is-stream": "^2.0.0", "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "hasown": { + "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, - "requires": { + "dependencies": { "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, - "he": { + "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true + "dev": true, + "bin": { + "he": "bin/he" + } }, - "html-escaper": { + "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "https-proxy-agent": { + "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, - "requires": { + "dependencies": { "agent-base": "6", "debug": "4" }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "dependencies": { - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "imurmurhash": { + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.19" + } }, - "indent-string": { + "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "requires": { + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "internal-slot": { + "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, - "requires": { + "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" } }, - "interpret": { + "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.10" + } }, - "is-array-buffer": { + "node_modules/is-array-buffer": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-bigint": { + "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "requires": { + "dependencies": { "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-boolean-object": { + "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-buffer": { + "node_modules/is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } }, - "is-callable": { + "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-core-module": { + "node_modules/is-core-module": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", "dev": true, - "requires": { + "dependencies": { "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-data-view": { + "node_modules/is-data-view": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, - "requires": { + "dependencies": { "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-date-object": { + "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-fullwidth-code-point": { + "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "is-negative-zero": { + "node_modules/is-negative-zero": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "is-number-object": { + "node_modules/is-number-object": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-regex": { + "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-shared-array-buffer": { + "node_modules/is-shared-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-stream": { + "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "is-string": { + "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "requires": { + "dependencies": { "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-symbol": { + "node_modules/is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "requires": { + "dependencies": { "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-typed-array": { + "node_modules/is-typed-array": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, - "requires": { + "dependencies": { "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-typedarray": { + "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, - "is-weakref": { + "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-windows": { + "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "isarray": { + "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true }, - "isexe": { + "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "istanbul-lib-coverage": { + "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "istanbul-lib-hook": { + "node_modules/istanbul-lib-hook": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", "dev": true, - "requires": { + "dependencies": { "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "istanbul-lib-instrument": { + "node_modules/istanbul-lib-instrument": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", "dev": true, - "requires": { + "dependencies": { "@babel/core": "^7.7.5", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", "semver": "^6.3.0" }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "istanbul-lib-processinfo": { + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", "dev": true, - "requires": { + "dependencies": { "archy": "^1.0.0", "cross-spawn": "^7.0.3", "istanbul-lib-coverage": "^3.2.0", @@ -1521,226 +2146,305 @@ "rimraf": "^3.0.0", "uuid": "^8.3.2" }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true - } + "engines": { + "node": ">=8" } }, - "istanbul-lib-report": { + "node_modules/istanbul-lib-processinfo/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, - "requires": { + "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "requires": { - "semver": "^7.5.3" - } - }, - "semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "istanbul-lib-source-maps": { + "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, - "requires": { + "dependencies": { "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "dependencies": { - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "istanbul-reports": { + "node_modules/istanbul-lib-source-maps/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, - "requires": { + "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "js-tokens": { + "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { + "node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "requires": { + "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "jsesc": { + "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } }, - "json5": { + "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } }, - "locate-path": { + "node_modules/locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "requires": { + "dependencies": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "lodash": { + "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.flattendeep": { + "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, - "log-symbols": { + "node_modules/log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "dev": true, - "requires": { + "dependencies": { "chalk": "^2.0.1" + }, + "engines": { + "node": ">=4" } }, - "lru-cache": { + "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "requires": { + "dependencies": { "yallist": "^3.0.2" } }, - "make-dir": { + "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, - "requires": { + "dependencies": { "semver": "^6.0.0" }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "mime-db": { + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.6" + } }, - "mime-types": { + "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, - "requires": { + "dependencies": { "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz", "integrity": "sha512-itcYJNfVYt/6nrpMDiFA6FY9msZ9G7jEfB896PrgYCakHrW0mOPmzBVvfI2b9yoy6kUKNde1Rvw4ah0f1E25tA==", "dev": true, - "requires": { + "dependencies": { "brace-expansion": "^1.0.0" + }, + "engines": { + "node": "*" } }, - "minimist": { + "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "mkdirp": { + "node_modules/mkdirp": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", + "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", "dev": true, - "requires": { + "dependencies": { "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" } }, - "mocha": { + "node_modules/mocha": { "version": "6.2.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", "dev": true, - "requires": { + "dependencies": { "ansi-colors": "3.2.3", "browser-stdout": "1.3.1", "debug": "3.2.6", @@ -1765,100 +2469,130 @@ "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, "dependencies": { - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "ms": { + "node_modules/ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, - "node-environment-flags": { + "node_modules/node-environment-flags": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", "dev": true, - "requires": { + "dependencies": { "object.getownpropertydescriptors": "^2.0.3", "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - } } }, - "node-fetch": { + "node_modules/node-environment-flags/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/node-fetch": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "dev": true, - "requires": { + "dependencies": { "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node-preload": { + "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, - "requires": { + "dependencies": { "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "node-releases": { + "node_modules/node-releases": { "version": "2.0.17", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz", "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==", "dev": true }, - "node-uuid": { + "node_modules/node-uuid": { "version": "1.4.6", "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.6.tgz", "integrity": "sha512-88D65cvjzQZEHCBfA5ZinRU7moQunwKN3y0LfvgM8DeeEzg8IKhzU9/BXrn31wu3WLCHHzTozepPRbYiyTzRVw==", - "dev": true + "deprecated": "Use uuid module instead", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } }, - "nodejs-file-downloader": { + "node_modules/nodejs-file-downloader": { "version": "4.13.0", "resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.13.0.tgz", "integrity": "sha512-nI2fKnmJWWFZF6SgMPe1iBodKhfpztLKJTtCtNYGhm/9QXmWa/Pk9Sv00qHgzEvNLe1x7hjGDRor7gcm/ChaIQ==", "dev": true, - "requires": { + "dependencies": { "follow-redirects": "^1.15.6", "https-proxy-agent": "^5.0.0", "mime-types": "^2.1.27", "sanitize-filename": "^1.6.3" } }, - "nyc": { + "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", "dev": true, - "requires": { + "dependencies": { "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", "caching-transform": "^4.0.0", @@ -1887,209 +2621,277 @@ "test-exclude": "^6.0.0", "yargs": "^15.0.2" }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/nyc/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/nyc/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/nyc/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/nyc/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" } }, - "object-inspect": { + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "object-keys": { + "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + } }, - "object.assign": { + "node_modules/object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, - "requires": { + "dependencies": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", "has-symbols": "^1.0.0", "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" } }, - "object.getownpropertydescriptors": { + "node_modules/object.getownpropertydescriptors": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.8.tgz", "integrity": "sha512-qkHIGe4q0lSYMv0XI4SsBTJz3WaURhLvd0lKSgtVuOsJ2krg4SgMw3PIRQFMp07yi++UR3se2mkcLqsBNpBb/A==", "dev": true, - "requires": { + "dependencies": { "array.prototype.reduce": "^1.0.6", "call-bind": "^1.0.7", "define-properties": "^1.2.1", @@ -2097,361 +2899,497 @@ "es-object-atoms": "^1.0.0", "gopd": "^1.0.1", "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { + "dependencies": { "wrappy": "1" } }, - "p-limit": { + "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "requires": { + "dependencies": { "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "node_modules/p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "requires": { + "dependencies": { "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "p-map": { + "node_modules/p-map": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", "dev": true, - "requires": { + "dependencies": { "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "p-try": { + "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "package-hash": { + "node_modules/package-hash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, - "requires": { + "dependencies": { "graceful-fs": "^4.1.15", "hasha": "^5.0.0", "lodash.flattendeep": "^4.4.0", "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "path-exists": { + "node_modules/path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "path-key": { + "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "picocolors": { + "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, - "pkg-dir": { + "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, - "requires": { + "dependencies": { "find-up": "^4.0.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, - "possible-typed-array-names": { + "node_modules/possible-typed-array-names": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + } }, - "process-on-spawn": { + "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", "dev": true, - "requires": { + "dependencies": { "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" } }, - "q": { + "node_modules/q": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", "integrity": "sha512-/CdEdaw49VZVmyIDGUQKDDT53c7qBkO6g5CefWz91Ae+l4+cRtcDYwMTXh6me4O8TMldeGHG3N2Bl84V78Ywbg==", - "dev": true + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", + "dev": true, + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } }, - "qs": { + "node_modules/qs": { "version": "6.12.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz", "integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==", "dev": true, - "requires": { + "dependencies": { "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "rechoir": { + "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, - "requires": { + "dependencies": { "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" } }, - "regexp.prototype.flags": { + "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.6", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "release-zalgo": { + "node_modules/release-zalgo": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", "dev": true, - "requires": { + "dependencies": { "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve": { + "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, - "requires": { + "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "resolve-from": { + "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "rimraf": { + "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dev": true, - "requires": { + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "safe-array-concat": { + "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "safe-regex-test": { + "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "sanitize-filename": { + "node_modules/sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", "dev": true, - "requires": { + "dependencies": { "truncate-utf8-bytes": "^1.0.0" } }, - "semver": { + "node_modules/semver": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.3.tgz", "integrity": "sha512-jXRt0450HFhUqjxdOchxCfajQsS9NjXEe+NxorJNyHXef2t9lmbuq2gDPFs5107LEYrU2RZDg9zGzcMjeng0Fw==", - "dev": true + "dev": true, + "bin": { + "semver": "bin/semver" + } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, - "set-function-length": { + "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, - "requires": { + "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, - "set-function-name": { + "node_modules/set-function-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, - "requires": { + "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, - "shebang-command": { + "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { + "dependencies": { "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "shebang-regex": { + "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "shelljs": { + "node_modules/shelljs": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, - "requires": { + "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" } }, - "side-channel": { + "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "signal-exit": { + "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "source-map": { + "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "spawn-wrap": { + "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, - "requires": { + "dependencies": { "foreground-child": "^2.0.0", "is-windows": "^1.0.2", "make-dir": "^3.0.0", @@ -2459,432 +3397,571 @@ "signal-exit": "^3.0.2", "which": "^2.0.1" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/spawn-wrap/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "string-width": { + "node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, - "requires": { + "dependencies": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" } }, - "string.prototype.trim": { + "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.0", "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string.prototype.trimend": { + "node_modules/string.prototype.trimend": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "string.prototype.trimstart": { + "node_modules/string.prototype.trimstart": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", "dev": true, - "requires": { + "dependencies": { "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, - "requires": { + "dependencies": { "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "supports-preserve-symlinks-flag": { + "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "test-exclude": { + "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, - "requires": { + "dependencies": { "@istanbuljs/schema": "^0.1.2", "glob": "^7.1.4", "minimatch": "^3.0.4" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "dependencies": { - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "to-fast-properties": { + "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "tr46": { + "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "truncate-utf8-bytes": { + "node_modules/truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==", "dev": true, - "requires": { + "dependencies": { "utf8-byte-length": "^1.0.1" } }, - "tunnel": { + "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } }, - "type-fest": { + "node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "typed-array-buffer": { + "node_modules/typed-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" } }, - "typed-array-byte-length": { + "node_modules/typed-array-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typed-array-byte-offset": { + "node_modules/typed-array-byte-offset": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, - "requires": { + "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typed-array-length": { + "node_modules/typed-array-length": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "typed-rest-client": { + "node_modules/typed-rest-client": { "version": "1.8.11", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", "integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==", "dev": true, - "requires": { + "dependencies": { "qs": "^6.9.1", "tunnel": "0.0.6", "underscore": "^1.12.1" } }, - "typedarray-to-buffer": { + "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, - "requires": { + "dependencies": { "is-typedarray": "^1.0.0" } }, - "typescript": { + "node_modules/typescript": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", - "dev": true + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "unbox-primitive": { + "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "underscore": { + "node_modules/underscore": { "version": "1.13.6", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, - "update-browserslist-db": { + "node_modules/update-browserslist-db": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, - "requires": { + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { "escalade": "^3.1.2", "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, - "utf8-byte-length": { + "node_modules/utf8-byte-length": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz", "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==", "dev": true }, - "validator": { + "node_modules/validator": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.10" + } }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "whatwg-url": { + "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, - "requires": { + "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { + "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "which-boxed-primitive": { + "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "requires": { + "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "which-module": { + "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true }, - "which-typed-array": { + "node_modules/which-typed-array": { "version": "1.1.15", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, - "requires": { + "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "wide-align": { + "node_modules/wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, - "requires": { + "dependencies": { "string-width": "^1.0.2 || 2" } }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", "strip-ansi": "^5.0.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "write-file-atomic": { + "node_modules/write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4", "is-typedarray": "^1.0.0", "signal-exit": "^3.0.2", "typedarray-to-buffer": "^3.1.5" } }, - "y18n": { + "node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, - "yallist": { + "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "yargs": { + "node_modules/yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, - "requires": { + "dependencies": { "cliui": "^5.0.0", "find-up": "^3.0.0", "get-caller-file": "^2.0.1", @@ -2895,55 +3972,65 @@ "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } } }, - "yargs-parser": { + "node_modules/yargs-parser": { "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, - "requires": { + "dependencies": { "flat": "^4.1.0", "lodash": "^4.17.15", "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" } } } From bf8fba4480a9afd74315b430ea9804864bfd27cd Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Thu, 21 Nov 2024 14:17:09 +0530 Subject: [PATCH 12/13] Deployed to Eric and Silviu --- Tasks/PowerShellV2/powershell.ps1 | 25 +++++++------------ Tasks/PowerShellV2/powershell.ts | 22 +++++++++------- Tasks/PowerShellV2/task.json | 2 +- Tasks/PowerShellV2/task.loc.json | 2 +- _generated/PowerShellV2.versionmap.txt | 4 +-- _generated/PowerShellV2/powershell.ps1 | 25 +++++++------------ _generated/PowerShellV2/powershell.ts | 22 +++++++++------- _generated/PowerShellV2/task.json | 6 ++--- _generated/PowerShellV2/task.loc.json | 6 ++--- _generated/PowerShellV2_Node20/powershell.ps1 | 25 +++++++------------ _generated/PowerShellV2_Node20/powershell.ts | 22 +++++++++------- _generated/PowerShellV2_Node20/task.json | 6 ++--- _generated/PowerShellV2_Node20/task.loc.json | 6 ++--- 13 files changed, 82 insertions(+), 91 deletions(-) diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index ccf2b90aa586..4993c189af47 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -118,21 +118,21 @@ class FileBasedToken { $eventFromA.Set() } elseif ($index -eq 1) { # Exit signal received - Write-Host "Task: Exit signal received. Exiting loop..." + Write-Debug "Task: Exit signal received. Exiting loop..." break } } catch { - Write-Host "Error occurred while waiting for signals: $_" + Write-Debug "Error occurred while waiting for signals: $_" } } } catch { - Write-Host "Critical error in Task: $_" + Write-Debug "Critical error in Task: $_" } finally { # Cleanup resources if ($null -ne $eventFromB ) { $eventFromB.Dispose() } if ($null -ne $eventFromA) { $eventFromA.Dispose() } if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Host "Task: Resources cleaned up. Exiting." + Write-Debug "Task: Resources cleaned up. Exiting." } } } @@ -278,15 +278,15 @@ try { $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) - function Get-AzDoTokenHelper { + function Get-AzDoToken { Write-Debug "User Script: Starting process to notify Task and read output." [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 try { # Signal Task to generate access token - $eventFromB.Set() - Write-Debug "User Script: Notified Task to generate access token." + $tmp = $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token $tmp." # Wait for Task to finish processing $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds @@ -310,13 +310,6 @@ try { return $tokenResponse } - - function Get-AzDoToken { - $token = Get-AzDoTokenHelper - $token = $token | Out-String - $token = $token.Substring(4).Trim() - return $token - } ' + $joinedContents @@ -441,7 +434,7 @@ finally { # Signal Script A to exit $exitSignal = "Global\ExitSignal" $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - $eventExit.Set() - Write-Host "Exit signal sent to Task." + $tmp = $eventExit.Set() + Write-Debug "Exit signal sent to Task $tmp." Trace-VstsLeavingInvocation $MyInvocation } \ No newline at end of file diff --git a/Tasks/PowerShellV2/powershell.ts b/Tasks/PowerShellV2/powershell.ts index d4a7504ecb44..2e83646fa48d 100644 --- a/Tasks/PowerShellV2/powershell.ts +++ b/Tasks/PowerShellV2/powershell.ts @@ -31,7 +31,7 @@ async function startNamedPiped() { pipeStream.on('data', async (data) => { const trimmedData = data.toString('utf8').trim(); - console.log(`Received from PowerShell: ${trimmedData}`); + console.debug(`Received from PowerShell: ${trimmedData}`); var systemAccessToken = tl.getVariable('System.AccessToken'); process.env.System_Access_Token_PSV2_Task = systemAccessToken; @@ -39,22 +39,26 @@ async function startNamedPiped() { try { if(connectedServiceName && connectedServiceName.trim().length > 0) { const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + console.debug(`Successfully fetched the ADO access token for ${connectedServiceName}`); writeStream.write(token + "\n"); } else { - console.log(`No Service Connection found, returning empty token`); + console.debug(`No Service Connection found, returning empty token`); writeStream.write(systemAccessToken + "\n"); } } catch(err) { - console.log(`Token generation failed with error message ${err.message}`); + console.debug(`Token generation failed with error message ${err.message}`); writeStream.write(systemAccessToken + "\n"); } } else { - console.log('Pipe reading ended'); - writeStream.close(); - pipeStream.close(); - fs.unlinkSync(ts2PsPipePath); - fs.unlinkSync(ps2TsPipePath); + try { + console.debug('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } catch(err) { + console.debug(`Cleanup failed : ${err.message}`); + } } }); diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index 9ea47cf9649c..d7d0ad195817 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 234 + "Patch": 248 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index f2a2ff1afff0..3e01d948aa84 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 234 + "Patch": 248 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 59aa7ece593c..7465c8db8f21 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.249.234 -Node20-225|2.249.235 +Default|2.249.248 +Node20-225|2.249.249 diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index ccf2b90aa586..4993c189af47 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -118,21 +118,21 @@ class FileBasedToken { $eventFromA.Set() } elseif ($index -eq 1) { # Exit signal received - Write-Host "Task: Exit signal received. Exiting loop..." + Write-Debug "Task: Exit signal received. Exiting loop..." break } } catch { - Write-Host "Error occurred while waiting for signals: $_" + Write-Debug "Error occurred while waiting for signals: $_" } } } catch { - Write-Host "Critical error in Task: $_" + Write-Debug "Critical error in Task: $_" } finally { # Cleanup resources if ($null -ne $eventFromB ) { $eventFromB.Dispose() } if ($null -ne $eventFromA) { $eventFromA.Dispose() } if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Host "Task: Resources cleaned up. Exiting." + Write-Debug "Task: Resources cleaned up. Exiting." } } } @@ -278,15 +278,15 @@ try { $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) - function Get-AzDoTokenHelper { + function Get-AzDoToken { Write-Debug "User Script: Starting process to notify Task and read output." [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 try { # Signal Task to generate access token - $eventFromB.Set() - Write-Debug "User Script: Notified Task to generate access token." + $tmp = $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token $tmp." # Wait for Task to finish processing $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds @@ -310,13 +310,6 @@ try { return $tokenResponse } - - function Get-AzDoToken { - $token = Get-AzDoTokenHelper - $token = $token | Out-String - $token = $token.Substring(4).Trim() - return $token - } ' + $joinedContents @@ -441,7 +434,7 @@ finally { # Signal Script A to exit $exitSignal = "Global\ExitSignal" $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - $eventExit.Set() - Write-Host "Exit signal sent to Task." + $tmp = $eventExit.Set() + Write-Debug "Exit signal sent to Task $tmp." Trace-VstsLeavingInvocation $MyInvocation } \ No newline at end of file diff --git a/_generated/PowerShellV2/powershell.ts b/_generated/PowerShellV2/powershell.ts index d4a7504ecb44..2e83646fa48d 100644 --- a/_generated/PowerShellV2/powershell.ts +++ b/_generated/PowerShellV2/powershell.ts @@ -31,7 +31,7 @@ async function startNamedPiped() { pipeStream.on('data', async (data) => { const trimmedData = data.toString('utf8').trim(); - console.log(`Received from PowerShell: ${trimmedData}`); + console.debug(`Received from PowerShell: ${trimmedData}`); var systemAccessToken = tl.getVariable('System.AccessToken'); process.env.System_Access_Token_PSV2_Task = systemAccessToken; @@ -39,22 +39,26 @@ async function startNamedPiped() { try { if(connectedServiceName && connectedServiceName.trim().length > 0) { const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + console.debug(`Successfully fetched the ADO access token for ${connectedServiceName}`); writeStream.write(token + "\n"); } else { - console.log(`No Service Connection found, returning empty token`); + console.debug(`No Service Connection found, returning empty token`); writeStream.write(systemAccessToken + "\n"); } } catch(err) { - console.log(`Token generation failed with error message ${err.message}`); + console.debug(`Token generation failed with error message ${err.message}`); writeStream.write(systemAccessToken + "\n"); } } else { - console.log('Pipe reading ended'); - writeStream.close(); - pipeStream.close(); - fs.unlinkSync(ts2PsPipePath); - fs.unlinkSync(ps2TsPipePath); + try { + console.debug('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } catch(err) { + console.debug(`Cleanup failed : ${err.message}`); + } } }); diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 505944797a43..3a69d44a00c8 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 234 + "Patch": 248 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.234", - "Node20-225": "2.249.235" + "Default": "2.249.248", + "Node20-225": "2.249.249" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index 1b9f3d83277b..a39cd71621db 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 234 + "Patch": 248 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.234", - "Node20-225": "2.249.235" + "Default": "2.249.248", + "Node20-225": "2.249.249" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index ccf2b90aa586..4993c189af47 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -118,21 +118,21 @@ class FileBasedToken { $eventFromA.Set() } elseif ($index -eq 1) { # Exit signal received - Write-Host "Task: Exit signal received. Exiting loop..." + Write-Debug "Task: Exit signal received. Exiting loop..." break } } catch { - Write-Host "Error occurred while waiting for signals: $_" + Write-Debug "Error occurred while waiting for signals: $_" } } } catch { - Write-Host "Critical error in Task: $_" + Write-Debug "Critical error in Task: $_" } finally { # Cleanup resources if ($null -ne $eventFromB ) { $eventFromB.Dispose() } if ($null -ne $eventFromA) { $eventFromA.Dispose() } if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Host "Task: Resources cleaned up. Exiting." + Write-Debug "Task: Resources cleaned up. Exiting." } } } @@ -278,15 +278,15 @@ try { $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromB) $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromA) - function Get-AzDoTokenHelper { + function Get-AzDoToken { Write-Debug "User Script: Starting process to notify Task and read output." [string]$tokenResponse = $env:SystemAccessTokenPowershellV2 try { # Signal Task to generate access token - $eventFromB.Set() - Write-Debug "User Script: Notified Task to generate access token." + $tmp = $eventFromB.Set() + Write-Debug "User Script: Notified Task to generate access token $tmp." # Wait for Task to finish processing $receivedResponseBool = $eventFromA.WaitOne(60000) # Wait for up to 60 seconds @@ -310,13 +310,6 @@ try { return $tokenResponse } - - function Get-AzDoToken { - $token = Get-AzDoTokenHelper - $token = $token | Out-String - $token = $token.Substring(4).Trim() - return $token - } ' + $joinedContents @@ -441,7 +434,7 @@ finally { # Signal Script A to exit $exitSignal = "Global\ExitSignal" $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - $eventExit.Set() - Write-Host "Exit signal sent to Task." + $tmp = $eventExit.Set() + Write-Debug "Exit signal sent to Task $tmp." Trace-VstsLeavingInvocation $MyInvocation } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ts b/_generated/PowerShellV2_Node20/powershell.ts index d4a7504ecb44..2e83646fa48d 100644 --- a/_generated/PowerShellV2_Node20/powershell.ts +++ b/_generated/PowerShellV2_Node20/powershell.ts @@ -31,7 +31,7 @@ async function startNamedPiped() { pipeStream.on('data', async (data) => { const trimmedData = data.toString('utf8').trim(); - console.log(`Received from PowerShell: ${trimmedData}`); + console.debug(`Received from PowerShell: ${trimmedData}`); var systemAccessToken = tl.getVariable('System.AccessToken'); process.env.System_Access_Token_PSV2_Task = systemAccessToken; @@ -39,22 +39,26 @@ async function startNamedPiped() { try { if(connectedServiceName && connectedServiceName.trim().length > 0) { const token = await getAccessTokenViaWorkloadIdentityFederation(connectedServiceName); - console.log(`Successfully fetched the ADO access token for ${connectedServiceName}`); + console.debug(`Successfully fetched the ADO access token for ${connectedServiceName}`); writeStream.write(token + "\n"); } else { - console.log(`No Service Connection found, returning empty token`); + console.debug(`No Service Connection found, returning empty token`); writeStream.write(systemAccessToken + "\n"); } } catch(err) { - console.log(`Token generation failed with error message ${err.message}`); + console.debug(`Token generation failed with error message ${err.message}`); writeStream.write(systemAccessToken + "\n"); } } else { - console.log('Pipe reading ended'); - writeStream.close(); - pipeStream.close(); - fs.unlinkSync(ts2PsPipePath); - fs.unlinkSync(ps2TsPipePath); + try { + console.debug('Pipe reading ended'); + writeStream.close(); + pipeStream.close(); + fs.unlinkSync(ts2PsPipePath); + fs.unlinkSync(ps2TsPipePath); + } catch(err) { + console.debug(`Cleanup failed : ${err.message}`); + } } }); diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index da6e0353ea1c..fe720acaf9c1 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 235 + "Patch": 249 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.234", - "Node20-225": "2.249.235" + "Default": "2.249.248", + "Node20-225": "2.249.249" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index d6373fa68a23..11f56dd7e948 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 235 + "Patch": 249 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.234", - "Node20-225": "2.249.235" + "Default": "2.249.248", + "Node20-225": "2.249.249" } } \ No newline at end of file From a5725f01c3562f807c4aa38e484df37190534d3d Mon Sep 17 00:00:00 2001 From: Praval Singhal Date: Mon, 25 Nov 2024 15:08:07 +0530 Subject: [PATCH 13/13] Refactored and Upload to Eric's Org --- .../VstsAzureRestHelpers_.psm1 | 2 +- Tasks/PowerShellV2/accessTokenHelper.ps1 | 149 ++++++++++++++++++ Tasks/PowerShellV2/powershell.ps1 | 113 +------------ Tasks/PowerShellV2/task.json | 2 +- Tasks/PowerShellV2/task.loc.json | 2 +- _generated/PowerShellV2.versionmap.txt | 4 +- _generated/PowerShellV2/accessTokenHelper.ps1 | 149 ++++++++++++++++++ _generated/PowerShellV2/powershell.ps1 | 113 +------------ _generated/PowerShellV2/task.json | 6 +- _generated/PowerShellV2/task.loc.json | 6 +- .../PowerShellV2_Node20/accessTokenHelper.ps1 | 149 ++++++++++++++++++ _generated/PowerShellV2_Node20/powershell.ps1 | 113 +------------ _generated/PowerShellV2_Node20/task.json | 6 +- _generated/PowerShellV2_Node20/task.loc.json | 6 +- 14 files changed, 482 insertions(+), 338 deletions(-) create mode 100644 Tasks/PowerShellV2/accessTokenHelper.ps1 create mode 100644 _generated/PowerShellV2/accessTokenHelper.ps1 create mode 100644 _generated/PowerShellV2_Node20/accessTokenHelper.ps1 diff --git a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 index afd0d52ea10c..706cc688af16 100644 --- a/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 +++ b/Tasks/Common/VstsAzureRestHelpers_/VstsAzureRestHelpers_.psm1 @@ -386,7 +386,7 @@ function Build-MSALInstance { Write-Verbose "ServiceConnectionId ${connectedServiceNameARM} and vstsAccessToken ${vstsAccessToken}" - $oidc_token = Get-VstsFederatedTokenModified -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken + $oidc_token = Get-VstsFederatedToken -serviceConnectionId $connectedServiceNameARM -vstsAccessToken $vstsAccessToken $msalClientInstance = $clientBuilder.WithClientAssertion($oidc_token).Build() } diff --git a/Tasks/PowerShellV2/accessTokenHelper.ps1 b/Tasks/PowerShellV2/accessTokenHelper.ps1 new file mode 100644 index 000000000000..34d4cf432d71 --- /dev/null +++ b/Tasks/PowerShellV2/accessTokenHelper.ps1 @@ -0,0 +1,149 @@ +function Global:Get-VstsFederatedTokenPSV2Task { + param( + [Parameter(Mandatory=$true)] + [string]$serviceConnectionId, + [Parameter(Mandatory=$true)] + [string]$vstsAccessToken + ) + + $uri = Get-VstsTaskVariable -Name 'System.CollectionUri' -Require + $planId = Get-VstsTaskVariable -Name 'System.PlanId' -Require + $jobId = Get-VstsTaskVariable -Name 'System.JobId' -Require + $hub = Get-VstsTaskVariable -Name 'System.HostType' -Require + $projectId = Get-VstsTaskVariable -Name 'System.TeamProjectId' -Require + + # Construct the API URL + $url = $uri + "$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" + + $headers = @{ + "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($vstsAccessToken)")) + "Content-Type" = "application/json" + } + + # Make the POST request to generate the OIDC token + $response = Invoke-WebRequest -Uri $url -Method Post -Headers $headers -Body $body + + # Parse the response content to extract the OIDC token + $responseContent = $response.Content | ConvertFrom-Json + $oidcToken = $responseContent.oidcToken # The token field contains the OIDC token + + + if ($null -eq $oidcToken -or $oidcToken -eq [string]::Empty) { + Write-Verbose "Failed to create OIDC token." + throw (New-Object System.Exception(Get-VstsLocString -Key AZ_CouldNotGenerateOidcToken)) + } + + Write-Verbose "OIDC Token generated Successfully" + return $oidcToken +} +New-Alias -Name 'Get-VstsFederatedToken' -Value 'Global:Get-VstsFederatedTokenPSV2Task' -Scope Global + +function Global:Get-WiscAccessTokenPSV2Task { + param ( + [Parameter(Mandatory=$true)] + [string]$connectedServiceName + ) + + $token = $env:SystemAccessTokenPowershellV2 + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + return $token +} +New-Alias -Name 'Get-WiscAccessTokenPSV2Task' -Value 'Global:Get-WiscAccessTokenPSV2Task' -Scope Global + +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + $token = Get-WiscAccessTokenPSV2Task -connectedServiceName $connectedServiceName + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + + } finally { + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote access token to file" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Debug "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Debug "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Debug "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Debug "Task: Resources cleaned up. Exiting." + } + } +} \ No newline at end of file diff --git a/Tasks/PowerShellV2/powershell.ps1 b/Tasks/PowerShellV2/powershell.ps1 index 4993c189af47..da300b7b7c36 100644 --- a/Tasks/PowerShellV2/powershell.ps1 +++ b/Tasks/PowerShellV2/powershell.ps1 @@ -1,13 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Global Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Global Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 - -$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require +. $PSScriptRoot\accessTokenHelper.ps1 function Get-ActionPreference { param ( @@ -33,115 +33,13 @@ function Get-ActionPreference { return $result } -class FileBasedToken { - [void] run($filePath) { - $signalFromUserScript = "Global\SignalFromUserScript" - $signalFromTask = "Global\SignalFromTask" - $exitSignal = "Global\ExitSignal" - - $eventFromB = $null - $eventFromA = $null - $eventExit = $null - - try { - $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) - $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) - $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - - # Ensure the output file has restricted permissions - if (-not (Test-Path $filePath)) { - New-Item -Path $filePath -ItemType File -Force - $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name - - # Create a new ACL that only grants access to the current user - $acl = Get-Acl $filePath - $acl.SetAccessRuleProtection($true, $false) # Disable inheritance - $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( - $currentUser, "FullControl", "Allow" - ) - $acl.SetAccessRule($rule) - - # Apply the ACL to the file - Set-Acl -Path $filePath -AclObject $acl - } - - Write-Debug "Task: Waiting for signals..." - - # Infinite loop to wait for signals and respond - while ($true) { - try { - # Wait for either UserScript signal or Exit signal - $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) - - if ($index -eq 0) { - # Signal from UserScript - try { - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Debug "Generated token found to be null, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } else { - Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - catch { - Write-Debug "Failed to generate token with message $_, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - - # Signal UserScript to read the file - $eventFromA.Set() - } elseif ($index -eq 1) { - # Exit signal received - Write-Debug "Task: Exit signal received. Exiting loop..." - break - } - } catch { - Write-Debug "Error occurred while waiting for signals: $_" - } - } - } catch { - Write-Debug "Critical error in Task: $_" - } finally { - # Cleanup resources - if ($null -ne $eventFromB ) { $eventFromB.Dispose() } - if ($null -ne $eventFromA) { $eventFromA.Dispose() } - if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Debug "Task: Resources cleaned up. Exiting." - } - } -} - Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") @@ -150,6 +48,7 @@ try { $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ diff --git a/Tasks/PowerShellV2/task.json b/Tasks/PowerShellV2/task.json index d7d0ad195817..e802cba7c4f6 100644 --- a/Tasks/PowerShellV2/task.json +++ b/Tasks/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 248 + "Patch": 284 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", diff --git a/Tasks/PowerShellV2/task.loc.json b/Tasks/PowerShellV2/task.loc.json index 3e01d948aa84..fe4baccfa9dd 100644 --- a/Tasks/PowerShellV2/task.loc.json +++ b/Tasks/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 248 + "Patch": 284 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", diff --git a/_generated/PowerShellV2.versionmap.txt b/_generated/PowerShellV2.versionmap.txt index 7465c8db8f21..cfaa2924e6f4 100644 --- a/_generated/PowerShellV2.versionmap.txt +++ b/_generated/PowerShellV2.versionmap.txt @@ -1,2 +1,2 @@ -Default|2.249.248 -Node20-225|2.249.249 +Default|2.249.284 +Node20-225|2.249.285 diff --git a/_generated/PowerShellV2/accessTokenHelper.ps1 b/_generated/PowerShellV2/accessTokenHelper.ps1 new file mode 100644 index 000000000000..34d4cf432d71 --- /dev/null +++ b/_generated/PowerShellV2/accessTokenHelper.ps1 @@ -0,0 +1,149 @@ +function Global:Get-VstsFederatedTokenPSV2Task { + param( + [Parameter(Mandatory=$true)] + [string]$serviceConnectionId, + [Parameter(Mandatory=$true)] + [string]$vstsAccessToken + ) + + $uri = Get-VstsTaskVariable -Name 'System.CollectionUri' -Require + $planId = Get-VstsTaskVariable -Name 'System.PlanId' -Require + $jobId = Get-VstsTaskVariable -Name 'System.JobId' -Require + $hub = Get-VstsTaskVariable -Name 'System.HostType' -Require + $projectId = Get-VstsTaskVariable -Name 'System.TeamProjectId' -Require + + # Construct the API URL + $url = $uri + "$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" + + $headers = @{ + "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($vstsAccessToken)")) + "Content-Type" = "application/json" + } + + # Make the POST request to generate the OIDC token + $response = Invoke-WebRequest -Uri $url -Method Post -Headers $headers -Body $body + + # Parse the response content to extract the OIDC token + $responseContent = $response.Content | ConvertFrom-Json + $oidcToken = $responseContent.oidcToken # The token field contains the OIDC token + + + if ($null -eq $oidcToken -or $oidcToken -eq [string]::Empty) { + Write-Verbose "Failed to create OIDC token." + throw (New-Object System.Exception(Get-VstsLocString -Key AZ_CouldNotGenerateOidcToken)) + } + + Write-Verbose "OIDC Token generated Successfully" + return $oidcToken +} +New-Alias -Name 'Get-VstsFederatedToken' -Value 'Global:Get-VstsFederatedTokenPSV2Task' -Scope Global + +function Global:Get-WiscAccessTokenPSV2Task { + param ( + [Parameter(Mandatory=$true)] + [string]$connectedServiceName + ) + + $token = $env:SystemAccessTokenPowershellV2 + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + return $token +} +New-Alias -Name 'Get-WiscAccessTokenPSV2Task' -Value 'Global:Get-WiscAccessTokenPSV2Task' -Scope Global + +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + $token = Get-WiscAccessTokenPSV2Task -connectedServiceName $connectedServiceName + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + + } finally { + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote access token to file" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Debug "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Debug "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Debug "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Debug "Task: Resources cleaned up. Exiting." + } + } +} \ No newline at end of file diff --git a/_generated/PowerShellV2/powershell.ps1 b/_generated/PowerShellV2/powershell.ps1 index 4993c189af47..da300b7b7c36 100644 --- a/_generated/PowerShellV2/powershell.ps1 +++ b/_generated/PowerShellV2/powershell.ps1 @@ -1,13 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Global Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Global Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 - -$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require +. $PSScriptRoot\accessTokenHelper.ps1 function Get-ActionPreference { param ( @@ -33,115 +33,13 @@ function Get-ActionPreference { return $result } -class FileBasedToken { - [void] run($filePath) { - $signalFromUserScript = "Global\SignalFromUserScript" - $signalFromTask = "Global\SignalFromTask" - $exitSignal = "Global\ExitSignal" - - $eventFromB = $null - $eventFromA = $null - $eventExit = $null - - try { - $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) - $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) - $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - - # Ensure the output file has restricted permissions - if (-not (Test-Path $filePath)) { - New-Item -Path $filePath -ItemType File -Force - $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name - - # Create a new ACL that only grants access to the current user - $acl = Get-Acl $filePath - $acl.SetAccessRuleProtection($true, $false) # Disable inheritance - $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( - $currentUser, "FullControl", "Allow" - ) - $acl.SetAccessRule($rule) - - # Apply the ACL to the file - Set-Acl -Path $filePath -AclObject $acl - } - - Write-Debug "Task: Waiting for signals..." - - # Infinite loop to wait for signals and respond - while ($true) { - try { - # Wait for either UserScript signal or Exit signal - $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) - - if ($index -eq 0) { - # Signal from UserScript - try { - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Debug "Generated token found to be null, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } else { - Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - catch { - Write-Debug "Failed to generate token with message $_, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - - # Signal UserScript to read the file - $eventFromA.Set() - } elseif ($index -eq 1) { - # Exit signal received - Write-Debug "Task: Exit signal received. Exiting loop..." - break - } - } catch { - Write-Debug "Error occurred while waiting for signals: $_" - } - } - } catch { - Write-Debug "Critical error in Task: $_" - } finally { - # Cleanup resources - if ($null -ne $eventFromB ) { $eventFromB.Dispose() } - if ($null -ne $eventFromA) { $eventFromA.Dispose() } - if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Debug "Task: Resources cleaned up. Exiting." - } - } -} - Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") @@ -150,6 +48,7 @@ try { $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ diff --git a/_generated/PowerShellV2/task.json b/_generated/PowerShellV2/task.json index 3a69d44a00c8..b2f84f57f37c 100644 --- a/_generated/PowerShellV2/task.json +++ b/_generated/PowerShellV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 248 + "Patch": 284 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.248", - "Node20-225": "2.249.249" + "Default": "2.249.284", + "Node20-225": "2.249.285" } } \ No newline at end of file diff --git a/_generated/PowerShellV2/task.loc.json b/_generated/PowerShellV2/task.loc.json index a39cd71621db..87804a948088 100644 --- a/_generated/PowerShellV2/task.loc.json +++ b/_generated/PowerShellV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 248 + "Patch": 284 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -269,7 +269,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.248", - "Node20-225": "2.249.249" + "Default": "2.249.284", + "Node20-225": "2.249.285" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/accessTokenHelper.ps1 b/_generated/PowerShellV2_Node20/accessTokenHelper.ps1 new file mode 100644 index 000000000000..34d4cf432d71 --- /dev/null +++ b/_generated/PowerShellV2_Node20/accessTokenHelper.ps1 @@ -0,0 +1,149 @@ +function Global:Get-VstsFederatedTokenPSV2Task { + param( + [Parameter(Mandatory=$true)] + [string]$serviceConnectionId, + [Parameter(Mandatory=$true)] + [string]$vstsAccessToken + ) + + $uri = Get-VstsTaskVariable -Name 'System.CollectionUri' -Require + $planId = Get-VstsTaskVariable -Name 'System.PlanId' -Require + $jobId = Get-VstsTaskVariable -Name 'System.JobId' -Require + $hub = Get-VstsTaskVariable -Name 'System.HostType' -Require + $projectId = Get-VstsTaskVariable -Name 'System.TeamProjectId' -Require + + # Construct the API URL + $url = $uri + "$projectId/_apis/distributedtask/hubs/$hub/plans/$planId/jobs/$jobId/oidctoken?serviceConnectionId=$serviceConnectionId&api-version=7.1-preview.1" + + $headers = @{ + "Authorization" = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($vstsAccessToken)")) + "Content-Type" = "application/json" + } + + # Make the POST request to generate the OIDC token + $response = Invoke-WebRequest -Uri $url -Method Post -Headers $headers -Body $body + + # Parse the response content to extract the OIDC token + $responseContent = $response.Content | ConvertFrom-Json + $oidcToken = $responseContent.oidcToken # The token field contains the OIDC token + + + if ($null -eq $oidcToken -or $oidcToken -eq [string]::Empty) { + Write-Verbose "Failed to create OIDC token." + throw (New-Object System.Exception(Get-VstsLocString -Key AZ_CouldNotGenerateOidcToken)) + } + + Write-Verbose "OIDC Token generated Successfully" + return $oidcToken +} +New-Alias -Name 'Get-VstsFederatedToken' -Value 'Global:Get-VstsFederatedTokenPSV2Task' -Scope Global + +function Global:Get-WiscAccessTokenPSV2Task { + param ( + [Parameter(Mandatory=$true)] + [string]$connectedServiceName + ) + + $token = $env:SystemAccessTokenPowershellV2 + if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { + Write-Host "No Service connection was found, returning the System Access Token" + } + else + { + $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + + $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` + -connectedServiceNameARM $connectedServiceName ` + -scope "499b84ac-1321-427f-aa17-267ca6975798" + + $token = $result.AccessToken + + if ($null -eq $token -or $token -eq [string]::Empty) { + Write-Debug "Generated token found to be null, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + } else { + Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" + } + } + return $token +} +New-Alias -Name 'Get-WiscAccessTokenPSV2Task' -Value 'Global:Get-WiscAccessTokenPSV2Task' -Scope Global + +class FileBasedToken { + [void] run($filePath) { + $signalFromUserScript = "Global\SignalFromUserScript" + $signalFromTask = "Global\SignalFromTask" + $exitSignal = "Global\ExitSignal" + + $eventFromB = $null + $eventFromA = $null + $eventExit = $null + + try { + $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) + $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) + $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) + + # Ensure the output file has restricted permissions + if (-not (Test-Path $filePath)) { + New-Item -Path $filePath -ItemType File -Force + $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + + # Create a new ACL that only grants access to the current user + $acl = Get-Acl $filePath + $acl.SetAccessRuleProtection($true, $false) # Disable inheritance + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( + $currentUser, "FullControl", "Allow" + ) + $acl.SetAccessRule($rule) + + # Apply the ACL to the file + Set-Acl -Path $filePath -AclObject $acl + } + + Write-Debug "Task: Waiting for signals..." + + # Infinite loop to wait for signals and respond + while ($true) { + try { + # Wait for either UserScript signal or Exit signal + $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) + + if ($index -eq 0) { + # Signal from UserScript + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + try { + [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) + $token = Get-WiscAccessTokenPSV2Task -connectedServiceName $connectedServiceName + } + catch { + Write-Debug "Failed to generate token with message $_, returning the System Access Token" + $token = $env:SystemAccessTokenPowershellV2 + + } finally { + $token | Set-Content -Path $filePath + Write-Debug "Task: Wrote access token to file" + } + + # Signal UserScript to read the file + $eventFromA.Set() + } elseif ($index -eq 1) { + # Exit signal received + Write-Debug "Task: Exit signal received. Exiting loop..." + break + } + } catch { + Write-Debug "Error occurred while waiting for signals: $_" + } + } + } catch { + Write-Debug "Critical error in Task: $_" + } finally { + # Cleanup resources + if ($null -ne $eventFromB ) { $eventFromB.Dispose() } + if ($null -ne $eventFromA) { $eventFromA.Dispose() } + if ($null -ne $eventExit) { $eventExit.Dispose() } + Write-Debug "Task: Resources cleaned up. Exiting." + } + } +} \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/powershell.ps1 b/_generated/PowerShellV2_Node20/powershell.ps1 index 4993c189af47..da300b7b7c36 100644 --- a/_generated/PowerShellV2_Node20/powershell.ps1 +++ b/_generated/PowerShellV2_Node20/powershell.ps1 @@ -1,13 +1,13 @@ [CmdletBinding()] param() -Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ -Global Import-Module $PSScriptRoot\ps_modules\Sanitizer +Import-Module $PSScriptRoot\ps_modules\VstsTaskSdk -Global Import-Module Microsoft.PowerShell.Security -Global . $PSScriptRoot\helpers.ps1 - -$env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require +. $PSScriptRoot\accessTokenHelper.ps1 function Get-ActionPreference { param ( @@ -33,115 +33,13 @@ function Get-ActionPreference { return $result } -class FileBasedToken { - [void] run($filePath) { - $signalFromUserScript = "Global\SignalFromUserScript" - $signalFromTask = "Global\SignalFromTask" - $exitSignal = "Global\ExitSignal" - - $eventFromB = $null - $eventFromA = $null - $eventExit = $null - - try { - $eventFromB = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromUserScript) - $eventFromA = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $signalFromTask) - $eventExit = [System.Threading.EventWaitHandle]::new($false, [System.Threading.EventResetMode]::AutoReset, $exitSignal) - - # Ensure the output file has restricted permissions - if (-not (Test-Path $filePath)) { - New-Item -Path $filePath -ItemType File -Force - $currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name - - # Create a new ACL that only grants access to the current user - $acl = Get-Acl $filePath - $acl.SetAccessRuleProtection($true, $false) # Disable inheritance - $rule = New-Object System.Security.AccessControl.FileSystemAccessRule( - $currentUser, "FullControl", "Allow" - ) - $acl.SetAccessRule($rule) - - # Apply the ACL to the file - Set-Acl -Path $filePath -AclObject $acl - } - - Write-Debug "Task: Waiting for signals..." - - # Infinite loop to wait for signals and respond - while ($true) { - try { - # Wait for either UserScript signal or Exit signal - $index = [System.Threading.WaitHandle]::WaitAny(@($eventFromB, $eventExit)) - - if ($index -eq 0) { - # Signal from UserScript - try { - - [string]$connectedServiceName = (Get-VstsInput -Name ConnectedServiceName) - - $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require - - $token = "" - - if ($null -eq $connectedServiceName -or $connectedServiceName -eq [string]::Empty) { - Write-Host "No Service connection was found, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } - else - { - $vstsEndpoint = Get-VstsEndpoint -Name $connectedServiceName -Require - - $result = Get-AccessTokenMSALWithCustomScope -endpoint $vstsEndpoint ` - -connectedServiceNameARM $connectedServiceName ` - -scope "499b84ac-1321-427f-aa17-267ca6975798" - - $token = $result.AccessToken - - if ($null -eq $token -or $token -eq [string]::Empty) { - Write-Debug "Generated token found to be null, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - } else { - Write-Debug "Successfully generated the Azure Access token for Service Connection : $connectedServiceName" - } - } - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - catch { - Write-Debug "Failed to generate token with message $_, returning the System Access Token" - $token = $env:SystemAccessTokenPowershellV2 - $token | Set-Content -Path $filePath - Write-Debug "Task: Wrote output to file at $token" - } - - # Signal UserScript to read the file - $eventFromA.Set() - } elseif ($index -eq 1) { - # Exit signal received - Write-Debug "Task: Exit signal received. Exiting loop..." - break - } - } catch { - Write-Debug "Error occurred while waiting for signals: $_" - } - } - } catch { - Write-Debug "Critical error in Task: $_" - } finally { - # Cleanup resources - if ($null -ne $eventFromB ) { $eventFromB.Dispose() } - if ($null -ne $eventFromA) { $eventFromA.Dispose() } - if ($null -ne $eventExit) { $eventExit.Dispose() } - Write-Debug "Task: Resources cleaned up. Exiting." - } - } -} - Trace-VstsEnteringInvocation $MyInvocation try { Import-VstsLocStrings "$PSScriptRoot\task.json" + $env:SystemAccessTokenPowershellV2 = Get-VstsTaskVariable -Name 'System.AccessToken' -Require + $tempDirectory = Get-VstsTaskVariable -Name 'agent.tempDirectory' -Require Assert-VstsPath -LiteralPath $tempDirectory -PathType 'Container' $tokenfilePath = [System.IO.Path]::Combine($tempDirectory, "$([System.Guid]::NewGuid()).txt") @@ -150,6 +48,7 @@ try { $runspacePool = [runspacefactory]::CreateRunspacePool(1, 1) $runspacePool.Open() + $myObject = [FileBasedToken]::new() # Create a PowerShell instance within the runspace pool $psRunspace = [powershell]::Create().AddScript({ diff --git a/_generated/PowerShellV2_Node20/task.json b/_generated/PowerShellV2_Node20/task.json index fe720acaf9c1..aed7f19024f9 100644 --- a/_generated/PowerShellV2_Node20/task.json +++ b/_generated/PowerShellV2_Node20/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 249 + "Patch": 285 }, "releaseNotes": "Script task consistency. Added support for macOS and Linux.", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: https://aka.ms/ado/75787" }, "_buildConfigMapping": { - "Default": "2.249.248", - "Node20-225": "2.249.249" + "Default": "2.249.284", + "Node20-225": "2.249.285" } } \ No newline at end of file diff --git a/_generated/PowerShellV2_Node20/task.loc.json b/_generated/PowerShellV2_Node20/task.loc.json index 11f56dd7e948..d76914ea8100 100644 --- a/_generated/PowerShellV2_Node20/task.loc.json +++ b/_generated/PowerShellV2_Node20/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 249, - "Patch": 249 + "Patch": 285 }, "releaseNotes": "ms-resource:loc.releaseNotes", "minimumAgentVersion": "2.115.0", @@ -273,7 +273,7 @@ "ScriptArgsSanitized": "ms-resource:loc.messages.ScriptArgsSanitized" }, "_buildConfigMapping": { - "Default": "2.249.248", - "Node20-225": "2.249.249" + "Default": "2.249.284", + "Node20-225": "2.249.285" } } \ No newline at end of file