Files

15 lines
691 B
PowerShell

param()
$ErrorActionPreference = 'Stop'
$dshRepoRoot = Split-Path -Parent $PSScriptRoot
$dshRuntimeRoot = Join-Path $dshRepoRoot 'integration/dsh'
$dshNodeCommand = Get-Command node -ErrorAction Stop
$dshNodeVersion = & $dshNodeCommand.Source -p 'process.versions.node'
if ([version]$dshNodeVersion -lt [version]'24.9.0') { throw 'DSH requires Node.js 24.9.0 or later.' }
Push-Location -LiteralPath $dshRuntimeRoot
try {
& npm.cmd ci --ignore-scripts --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { throw 'DSH installation failed.' }
& $dshNodeCommand.Source start.mjs --doctor
if ($LASTEXITCODE -ne 0) { throw 'DSH runtime verification failed.' }
} finally { Pop-Location }