File tree Expand file tree Collapse file tree
boilerplate-aspnet-webservice
boilerplate-react-azurefunction
boilerplate-typescript-react Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
1515$appRoot = $PSScriptRoot
1616$envFile = Join-Path $appRoot ' .env'
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ param(
1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
15- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ..\ ..' )).Path
16- $toolRoot = Join-Path $repoRoot ' Tools\ sample-validation'
15+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ../ ..' )).Path
16+ $toolRoot = Join-Path $repoRoot ' Tools/ sample-validation'
1717$appRoot = $PSScriptRoot
1818$envFile = Join-Path $appRoot ' .env'
1919$handles = @ ()
Original file line number Diff line number Diff line change 1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
1515$appRoot = $PSScriptRoot
1616$appSettingsPath = Join-Path $appRoot ' appsettings.json'
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ param(
1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
15- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ..\ ..' )).Path
16- $toolRoot = Join-Path $repoRoot ' Tools\ sample-validation'
15+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ../ ..' )).Path
16+ $toolRoot = Join-Path $repoRoot ' Tools/ sample-validation'
1717$appRoot = $PSScriptRoot
18- $clientRoot = Join-Path $appRoot ' packages\ client-app'
19- $functionsRoot = Join-Path $appRoot ' packages\ azure-functions'
18+ $clientRoot = Join-Path $appRoot ' packages/ client-app'
19+ $functionsRoot = Join-Path $appRoot ' packages/ azure-functions'
2020$clientEnvPath = Join-Path $clientRoot ' .env'
2121$localSettingsPath = Join-Path $functionsRoot ' local.settings.json'
2222$handles = @ ()
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ param(
1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
15- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ..\ ..' )).Path
16- $toolRoot = Join-Path $repoRoot ' Tools\ sample-validation'
15+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ../ ..' )).Path
16+ $toolRoot = Join-Path $repoRoot ' Tools/ sample-validation'
1717$appRoot = $PSScriptRoot
1818$functionApiRoot = Join-Path $appRoot ' function-api'
1919$clientRoot = Join-Path $appRoot ' react-client'
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ param(
1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
15- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ..\ ..' )).Path
16- $toolRoot = Join-Path $repoRoot ' Tools\ sample-validation'
15+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ../ ..' )).Path
16+ $toolRoot = Join-Path $repoRoot ' Tools/ sample-validation'
1717$appRoot = $PSScriptRoot
1818$runtimeHandle = $null
1919
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ param(
1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
15- $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ..\ ..' )).Path
16- $toolRoot = Join-Path $repoRoot ' Tools\ sample-validation'
15+ $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot ' ../ ..' )).Path
16+ $toolRoot = Join-Path $repoRoot ' Tools/ sample-validation'
1717$appRoot = $PSScriptRoot
1818$runtimeHandle = $null
1919
Original file line number Diff line number Diff line change 1010Set-StrictMode - Version Latest
1111$ErrorActionPreference = ' Stop'
1212
13- . (Join-Path $PSScriptRoot ' ..\..\ Tools\ powershell\ SampleValidation.ps1' )
13+ . (Join-Path $PSScriptRoot ' ../../ Tools/ powershell/ SampleValidation.ps1' )
1414
1515$appRoot = $PSScriptRoot
1616$packageRoot = Join-Path $appRoot ' src'
4444 }
4545
4646 try {
47- $response = Invoke-WebRequest - Method Post - Uri $validationUrl - UseBasicParsing - TimeoutSec 5 - ContentType ' application/json' - Body ' {}'
47+ $invokeWebRequestArguments = @ {
48+ Method = ' Post'
49+ Uri = $validationUrl
50+ TimeoutSec = 5
51+ ContentType = ' application/json'
52+ Body = ' {}'
53+ }
54+ if ((Get-Command Invoke-WebRequest ).Parameters.ContainsKey(' UseBasicParsing' )) {
55+ $invokeWebRequestArguments [' UseBasicParsing' ] = $true
56+ }
57+ $response = Invoke-WebRequest @invokeWebRequestArguments
4858 if ([string ]$response.Content -eq $validationToken ) {
4959 $validated = $true
5060 break
Original file line number Diff line number Diff line change @@ -232,7 +232,15 @@ function Wait-ForHttpEndpoint {
232232 }
233233
234234 try {
235- $response = Invoke-WebRequest - Uri $Url - UseBasicParsing - TimeoutSec 5 - MaximumRedirection 0
235+ $invokeWebRequestArguments = @ {
236+ Uri = $Url
237+ TimeoutSec = 5
238+ MaximumRedirection = 0
239+ }
240+ if ((Get-Command Invoke-WebRequest ).Parameters.ContainsKey(' UseBasicParsing' )) {
241+ $invokeWebRequestArguments [' UseBasicParsing' ] = $true
242+ }
243+ $response = Invoke-WebRequest @invokeWebRequestArguments
236244 if ($AllowedStatusCodes -contains [int ]$response.StatusCode ) {
237245 return $response
238246 }
@@ -301,7 +309,7 @@ function Ensure-BrowserTooling {
301309 [switch ]$SkipInstall
302310 )
303311
304- $playwrightPath = Join-Path $ToolRoot ' node_modules\ playwright'
312+ $playwrightPath = Join-Path $ToolRoot ' node_modules/ playwright'
305313 if (-not (Test-Path $playwrightPath )) {
306314 if ($SkipInstall ) {
307315 Write-Host ' Shared browser validation tooling is missing; installing it even though -SkipInstall was specified.' - ForegroundColor Yellow
You can’t perform that action at this time.
0 commit comments