feat(app): add diagnostics and update runtime
This commit is contained in:
31
scripts/verify.ps1
Normal file
31
scripts/verify.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
function Invoke-Step {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Name,
|
||||
[Parameter(Mandatory = $true)][string]$Command,
|
||||
[Parameter(Mandatory = $true)][string[]]$Arguments
|
||||
)
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==> $Name"
|
||||
& $Command @Arguments
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "$Name failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-Step 'Typecheck' 'npm.cmd' @('run', 'typecheck')
|
||||
Invoke-Step 'Tests' 'npm.cmd' @('run', 'test:run')
|
||||
Invoke-Step 'Lint' 'npm.cmd' @('run', 'lint')
|
||||
Invoke-Step 'Build' 'npm.cmd' @('run', 'build')
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==> Audit summary"
|
||||
& npm.cmd audit --audit-level=moderate
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning 'npm audit reported vulnerabilities. See the output above; verification gates still passed.'
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Verification complete."
|
||||
Reference in New Issue
Block a user