Files
OpenShell/tasks/scripts/typescript-install.ps1
T
Prekshi VyasandShailendra Singh d95bab5436 fix(ci): upstream Windows SDK validation support (#3327)
* fix(ci): upstream Windows SDK validation support

Port remaining Windows validation tooling from GitLab independently of the combined MXC runtime port. Preserve locked SDK dependencies and guard temporary launcher cleanup.

Co-authored-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

* fix(ci): install native TypeScript dependencies before validation

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

---------

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Shailendra Singh <shailendras@nvidia.com>
2026-09-15 22:34:36 +00:00

41 lines
1.2 KiB
PowerShell

# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
[CmdletBinding()]
param()
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$nodeArchitecture = (& node -p "process.arch").Trim()
if ($LASTEXITCODE -ne 0) {
throw "Unable to determine the Node.js process architecture (exit code $LASTEXITCODE)."
}
if ($nodeArchitecture -notin @('x64', 'arm64')) {
throw "Unsupported Windows Node.js architecture '$nodeArchitecture'."
}
$previousCpu = $env:npm_config_cpu
try {
$env:npm_config_cpu = $nodeArchitecture
& npm ci
if ($LASTEXITCODE -ne 0) {
throw "Unable to install TypeScript SDK dependencies (exit code $LASTEXITCODE)."
}
}
finally {
$env:npm_config_cpu = $previousCpu
}
$nativePackages = @(
"@biomejs/cli-win32-$nodeArchitecture",
"@bufbuild/buf-win32-$nodeArchitecture",
"@rolldown/binding-win32-$nodeArchitecture-msvc"
)
foreach ($package in $nativePackages) {
$manifest = Join-Path 'node_modules' (Join-Path $package 'package.json')
if (-not (Test-Path -LiteralPath $manifest -PathType Leaf)) {
throw "The lockfile-pinned native dependency '$package' was not installed."
}
}