$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot Set-Location $root if(-not(Get-Command node -ErrorAction SilentlyContinue)){throw 'Instala Node.js 22.4+ LTS.'} & npm run check if($LASTEXITCODE -ne 0){throw 'Errores de sintaxis; revisa el codigo antes de transmitir'} Write-Host 'Iniciando puente local. Para detener, Ctrl+C.' -ForegroundColor Green & node src/main.mjs