# DBAOps Sovereign™ — Build
# Run from repository root

$ErrorActionPreference = "Stop"
$root = (Get-Item $PSScriptRoot).Parent.FullName
Set-Location $root

Write-Host "DBAOps Sovereign™ — Building..." -ForegroundColor Cyan

# Root deps
npm install 2>$null

# API (no build - JS)
Write-Host "API: ready" -ForegroundColor Gray

# Web
Set-Location src\web
npm run build
if ($LASTEXITCODE -ne 0) { throw "Web build failed" }
Set-Location $root

Write-Host "Build complete." -ForegroundColor Green
